>> Dear list,
>>
>> Is there a flag for enabling Binary Constants using the ?0b? Prefix?
> I am grateful to you for introducing me to a bug in the versions of
> clang and gcc on my Mac: the use of '0b' is not rejected in -std=c99
> or -std=c11 mode unless you also say -pedantic.
>
> 0b is wasn't in C89 or C99 and isn't in C11.
> Why do you want it?
> Have you considered running the source code through a preprocessor
> that turns base 2 into base 8 or base 16?
Hi Richard,

The 0b is a GCC extension. When you compile with the options "-pedantic 
-std=c99 -Wall", the you see the warnings like "binary constants are a 
GCC extension".

At the end of the day, I would like to remove these GCC extensions.
But at first I would like that splint falls through this code, instead 
of the parsing error. The (default) option "+gnuextensions" does not do 
the trick.

I did not consider using a preprocessor for converting the 0b. Do you 
have a pointer to such a preprocessor?

Thanks, Arjan

_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss

Reply via email to