









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] gcc pre-defined macros
Aaron Birenboim wrote:
> I remember once apon a time, I found a way to list
> all the pre-defined macros from gcc. It was like
> several PAGES long. Things like: __unix, __linux__,
> i386, __i386, __STDC__, LITTLE_ENDIAN....
>
> I'm having a devil of a time remembering how I did that.
> And... I NEED it again. Could anybody give me hint
> about how to get such a list again?
Are you looking for something like this? This show the defaults when
gcc is invoked.
$ echo 'main(){printf("hello world\n");}' | gcc -E -v -
Reading specs from /usr/lib/gcc-lib/i486-box-linux/2.7.2/specs
gcc version 2.7.2
/usr/lib/gcc-lib/i486-box-linux/2.7.2/cpp -lang-c -v -undef
-D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux
-D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386
-D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386)
-Amachine(i386) -D__i486__ -
The above pasted from the GCC-HOWTO.
Also I think that
$ info gcc
will list and describe all of the pre-defines, but that's a large
collection of files and I don't remember exactly where to start looking,
but I believe the list is near the beginning.
Hope that's some help.
--
Michael Maddex Instructor, Computer Science
Northern New Mexico Community College
921 Paseo de Oñate Española NM 87531
Ignorance is not bliss, ignorance is ignorance.
------------------------------------------------------
To UNSUBSCRIBE send a message to nmlug-request@swcp.com
with only the word unsubscribe in the body. More
information can be found at www.nmlug.org/info.html
-----------------------------------------------------
|
|