Content originally posted in LPCWare by caprock on Thu Feb 21 11:03:58 MST 2013
How to make Compiler support "Labels as Values" as described in GNU Extensions
Red Suite (NXP Edition):
Version: Red Suite (NXP Edition) v4.2.2 [Build 361] [03/04/2012]
Win 7/ LPC1768
I am trying to compile a protothread example (Google Code Archive - Long-term storage for Google Code Project Hosting. )
and am getting compiler warnings for functions where the __GNUC__ extensions are
used to provide the [B][I]Labels as Values[/I][/B]. The resultant code seems to drop these warning lines from the binary axf file.
To see these warnings, I enabled the project Settings/Warnings and ticked Pedantic (-pedantic) and see the warning described as [B][I]ISO C forbids 'goto *expr;'[/I][/B].
I then added the [B]__GNUC__[/B] directive to Settings/Symbols with no change in behavior. In both cases, I see:
GNU C (Red Suite 2010Q4 by Code Red) version 4.5.1 (arm-none-eabi)
compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
I am fairly certain that there is a setting that I have overlooked, but can't
seem to locate it.
:confused:
Can anyone give me a hint as to why the GCC Extensions do not seem to override the
ISO C functionality?