[OpenBIOS] [commit] r759 - in trunk/fcode-utils-devel: detok romheaders toke
Andreas Färber
andreas.faerber at web.de
Mon May 24 12:13:03 CEST 2010
Am 24.05.2010 um 11:29 schrieb Andreas Färber:
> Am 26.04.2010 um 19:01 schrieb repository service:
>
>> =
>> =====================================================================
>> --- trunk/fcode-utils-devel/toke/Makefile Mon Apr 26 17:57:21 2010
>> (r758)
>> +++ trunk/fcode-utils-devel/toke/Makefile Mon Apr 26 19:01:01 2010
>> (r759)
>> @@ -29,7 +29,7 @@
>> INCLUDES = -I../shared
>>
>> # Normal flags
>> -CFLAGS = -O2 -Wall -Wextra
>> +CFLAGS = -O2 -Wall -ansi -Wno-pointer-sign #-Wextra
>> LDFLAGS =
>>
>> # Coverage:
>
> OpenSolaris' gcc does not understand -Wno-pointer-sign:
>
> cc1: error: unrecognized command line option "-Wno-pointer-sign"
Worse, -ansi breaks getopt:
toke.c: In function `get_args':
toke.c:257: warning: implicit declaration of function `getopt'
toke.c:268: error: `optarg' undeclared (first use in this function)
toke.c:268: error: (Each undefined identifier is reported only once
toke.c:268: error: for each function it appears in.)
toke.c:337: error: `optind' undeclared (first use in this function)
toke.c: In function `main':
toke.c:391: error: `optind' undeclared (first use in this function)
getopt, optarg, optind are defined in stdlib.h under the following
conditions:
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC_) && !defined(__XOPEN_OR_POSIX))
optarg is also defined in getopt.h but not getopt itself.
-std=gnu99 does not help, only defining __EXTENSIONS__ or not using -
ansi.
When defining neither -ansi nor -Wno-pointer-sign in toke/Makefile and
detok/Makefile it builds without warnings.
Andreas
More information about the OpenBIOS
mailing list