Go Down

Topic: #defines in the middle of code (Read 2 times) previous topic - next topic

PaulS

Quote
But isn't that preprocessor a part of the standard c/c++ compiler

It's part of the acr-gcc compiler, yes.

drhex

#11
Aug 04, 2010, 06:38 pm Last Edit: Aug 04, 2010, 08:23 pm by drhex Reason: 1
Forgive me for sounding stupid here, but...   surely there is nothing avr-specific about the #define, #include and #ifdefs handled by the preprocessor. So it ought to be a part of gcc/g++.   Therefore I do not understand why the bug in question is referred to as a "bug in Arduino 0017".

PaulS

The thread I read that discussed the issue said the OP was using Arduino 0017. That is what I based my statement "at least in Arduino 0017" on. It may be more widespread than that. It may have been fixed, or not. I don't know. Or care. I put #defines at the top of the code where they belong.

If you don't, and it works for you to put them in the middle, great. If you put them in the middle, and they don't work, you know what to do about the problem.

Go Up