Re: Predefined C defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rod.niner@xxxxxx writes:

> Normally there are #defines build into compilers to detect compiler type,
> version and chip types.
> Is there a list of these some place
> I seem to remember I  could wrap code around an #ifdef _GNU so that when
> the compiler would change I could alert others to compiler specific
> sections of code.

The exact set of predefined macros will vary depending on the command
line arguments.  You can see them by doing this:
    gcc -E -dD -x c /dev/null
along with whatever other arguments you want to pass.

gcc does not define _GNU, but it does define __GNUC__.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux