Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

#ifdef __GCC__ (or something?)

1,335 views
Skip to first unread message

JDonner

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
Hi

Does GCC define a macro that signals its presence?

thanks,

Jeff


JDonner

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
> Does GCC define a macro that signals its presence?


Found the answers via info/cpp/index


Martin Kahlert

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to JDonner
[Posted and mailed]

In article <M9QW5.1460$yA5.2...@news.shore.net>,
"JDonner" <jdo...@schedsys.com> writes:
> Hi


> Does GCC define a macro that signals its presence?

gcc always defines __GNUC__,
so #if defined __GNUC__ should work

Hope that helps,
Martin.

--
The early bird gets the worm. If you want something else for
breakfast, get up later.

Maurizio Loreti

unread,
Dec 5, 2000, 3:00:00 AM12/5/00
to
"JDonner" <jdo...@schedsys.com> writes:

> Does GCC define a macro that signals its presence?

From the info documentation: the following should list all the
preprocessor defined symbols.

touch empty.c # Create an empty file
gcc -E -dM empty.c # Compile, with prepr. symb. list
rm empty.c # Remove the empty file

--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Univ. of Padova, Dept. of Physics - Padova, Italy lor...@pd.infn.it

Murphy's law: "Anything that can go wr
/bin/fortune: segmentation fault - core dumped

0 new messages