[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
probing for compiler attributes?
From: |
Joshua Hoblitt |
Subject: |
probing for compiler attributes? |
Date: |
Tue, 7 Aug 2007 11:49:08 -1000 |
Is there a pre-canned AC macro or other reliable means of testing for
compiler attributes?
I have an awful lot of code that looks something like this:
void *myfunc(char *myvar
#ifdef __GNUC__
) __attribute__((malloc));
# else // ifdef __GNUC__
);
#endif // ifdef __GNUC__
and it has to the potential to get a lot worse if I have to start testing
for what version of GNUC we have to use a new attribute. While I
realize this could all be done with CPP macros it occurred to me it would
be nice to have this information available from config.h.
-J
--
pgplToLvIRuNF.pgp
Description: PGP signature
- probing for compiler attributes?,
Joshua Hoblitt <=