probing for compiler attributes?

2007-08-07 Thread John W. Eaton
On 7-Aug-2007, Joshua Hoblitt wrote: | 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)); |

Re: probing for compiler attributes?

2007-08-07 Thread Joshua Hoblitt
That's close but not exactly what I was looking for. That tells you if __attribute__() is supported at all but not if __attribute__((malloc)), __attribute__((deprecated)), etc. works. If that's the only code in the wild I guess I'll have to roll my own... -J -- On Wed, Aug 08, 2007 at 01:21:48A

Re: probing for compiler attributes?

2007-08-07 Thread Benoit SIGOURE
On Aug 7, 2007, at 11:49 PM, Joshua Hoblitt wrote: 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));

probing for compiler attributes?

2007-08-07 Thread Joshua Hoblitt
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__ ); #e