This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Feature request - a macro defined for GCC


Paul Koning:
> >>>>> "Ralf" == Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> 
>  Ralf> I feel like I'm stating the obvious, but maybe you're just
>  Ralf> trying to rediscover feature-based tests: do a test compile
>  Ralf> that exposes the compiler bug or feature you're looking for.
> 
>  Ralf> Autoconf provides a framework that supports this kind of
>  Ralf> testing, among others.
> 
> Autoconf is a massively cryptic and complicated way to make up for the
> lack of "I have feature X" CPP flags in the compiler.
> 
> Chris is right, that's the correct way to do things.
> 
>       paul

Cpp does not, however, define macros based on command line options,
for example __C99_STD_CMD_LINE_OPTION__.  You could do the same thing
yourself with a -D__MY_C99_STUFF__, for example, on the command line.

I also feel like I keep stating the obvious, but there are a lot of
GNU C platforms that don't use glibc and wouldn't have any need for
such feature-based macros, (or they would need their own unique
features) but they still comply with standard C.

-- 
Ctalk Home Page: http://www.ctalklang.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]