Jump to content
Sign in to follow this  
gweather

redefinition problem

Recommended Posts

The code is like this:

 

unsigned char Temperature;

#define MAX_TEMPERATURE 94

.

.

 if( Temperature > MAX_TEMERATURE )

{

...

}

 

Compiler says Temperature is begin redefined

I have trippled checked and Temperature is only defined as the unsigned char.

Share this post


Link to post
Share on other sites
Guest Pavel

Can't reproduce it. Tried on the code:

 

unsigned char Temperature;
#define MAX_TEMPERATURE 94

main()
{
if( Temperature > MAX_TEMPERATURE )
{
 Temperature = 0;
}
}

Something else must be wrong in your code.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites
Guest Joe

I have seen this too, i checked and checked then deleted the function and re-wrote it.

 

 

There is a compiler bug here, but i cannot reproduce it.

 

The vars i was using were global chars.

Share this post


Link to post
Share on other sites
Guest Pavel

I need a test case where the problem can be reproduced. I can't fix something unreproduceable.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites
Guest Joe

its a weird one this... Its very hard to reproduce, next time this happens, i'll zip up my project and email to you if thats ok?

Share this post


Link to post
Share on other sites
Guest Pavel
... next time this happens, i'll zip up my project and email to you if thats ok?

Yes please send it to me.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...