mac os x port: error when trying to detect __attribute__
Kevin P. Fleming
kpfleming@digium.com
Sun Jan 11 15:15:00 GMT 2009
Vincent Torri wrote:
> but a guy told me that with his gcc version (4.0.1 or 4.2.*), he has the
> error
>
> error: nested functions are disabled, use -fnested-functions to re-enable
Some platforms have nested functions disabled by default (including
FreeBSD, IIRC).
> 1) why is there a problem with the mac os x port ?
There is no problem, it's just a configuration choice.
> 2) is my test program good enough ? Is there a better way to check the
> availability of __attribute__ ?
Move your test function outside of main() so it won't be nested.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the Gcc-help
mailing list