(flag=GPS_SPEED_L_BOUNDED) ? "(GPS_SPEED_L_BOUNDED)" : \ (flag=GPS_DATA_SANITY_ERR) ? "(GPS_DATA_SANITY_ERR)" : \ (flag=GPS_SIMULATED_INPUT) ? "(GPS_SIMULATED_INPUT)" : \ (flag=GPS_BAD_SAT_COVERAG) ? "(GPS_BAD_SAT_COVERAG)" : \ In past code I've used the ? : operator to deliver strings, e.g.: You can see that I wanted the toggle to not just fork over a true / false but actually alter the variable fed to it.īut based on your comments I'm more content with the if/then/else structure. Is there someone who can check my bug being fixed by the change in v3.189? The release note only mentions a change to meet the ANSI requirements, nothing about bug fixes. Version 3.187 is the latest version I have. This might be related to what you are seeing in 3.187. Last edited by ckielstra on Fri 2:05 am edited 1 time in totalĪccording to the version history page at:ģ.189 Macro processing algorithm has been updated to meet ANSI requirements #define _TOGGLE(flag) īut, as said, I prefer the if-then implementation which also turns out to result in the shortest code here. These don't COMPILE, so I don't know if this is related to what you're seeing or not: I am willing to admit that there is some kind of bug below that precludes these from compiling correctly, but I don't see it. I am using PCH 3.187 (I reverted back from 3.190) on 18F8720 and have also had macro expansion problems, specifically with the ? : operator. Last edited by ckielstra on Fri 2:28 am edited 1 time in total Looks like an compiler initialization problem?Ĭan someone explain to me if I'm overlooking something or should I report this as a bug? The strange thing is that after once having used the macro in combination with an assignment (=, +=, -=) all macro's are expanding correctly. Missing for the error examples !!! -ġ9: foo =). #fuses HS,NOWDT,OSCSEN,PUT,BROWNOUT,NOLVP Sometimes two assembly lines are missing in the expanded code, this depends on the context and sequence of the macro being used. I think I found a compiler bug related to macro expansions. Please do not post bug reports on this forum. CCS :: View topic - Macro expansion problemįAQ Forum Help Official CCS Support Search Register Profile Log in to check your private messages Log inĬCS does not monitor this forum on a regular basis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |