__STDC__

2000-07-10 Thread Ian Zimmerman

Why does gcc not predefine the __STDC__ macro now?  Almost anything I
try to compile is broken by this.

kronstadt:/usr/include$ gcc -E -dM -xc /dev/null
#define __linux__ 1 
#define linux 1 
#define __i386__ 1 
#define __i386 1 
#define __GNUC_MINOR__ 95 
#define i386 1 
#define __unix 1 
#define __unix__ 1 
#define __GNUC__ 2 
#define __linux 1 
#define __ELF__ 1 
#define unix 1 
kronstadt:/usr/include$

-- 
Ian Zimmerman, Oakland, California, U.S.A.
In his own soul a man bears the source
from which he draws all his sorrows and his joys.
Sophocles.



Re: __STDC__

2000-07-10 Thread Mark Brown
On Sun, Jul 09, 2000 at 09:00:55PM -0700, Ian Zimmerman wrote:

 kronstadt:/usr/include$ gcc -E -dM -xc /dev/null
 #define __linux__ 1 
 #define linux 1 
 #define __i386__ 1 
 #define __i386 1 
 #define __GNUC_MINOR__ 95 
 #define i386 1 
 #define __unix 1 
 #define __unix__ 1 
 #define __GNUC__ 2 
 #define __linux 1 
 #define __ELF__ 1 
 #define unix 1 

That doesn't define __STDC__ on Slink either.

-- 
Mark Brown  mailto:[EMAIL PROTECTED]   (Trying to avoid grumpiness)
http://www.tardis.ed.ac.uk/~broonie/
EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/


pgprsta4gZ7gj.pgp
Description: PGP signature


Re: __STDC__

2000-07-10 Thread Ian Zimmerman

 kronstadt:/usr/include$ gcc -E -dM -xc /dev/null
 #define __linux__ 1 
 #define linux 1 
 #define __i386__ 1 
 #define __i386 1 
 #define __GNUC_MINOR__ 95 
 #define i386 1 
 #define __unix 1 
 #define __unix__ 1 
 #define __GNUC__ 2 
 #define __linux 1 
 #define __ELF__ 1 
 #define unix 1 

Mark That doesn't define __STDC__ on Slink either.

Hmmm.  I have actually solved the compilation problem, and it was
unrelated; in other words, __STDC__ _is_ defined during normal
compiles.  Any gcc guru here to explain why it doesn't show in the
output of the above command?

-- 
Ian Zimmerman, Oakland, California, U.S.A.
In his own soul a man bears the source
from which he draws all his sorrows and his joys.
Sophocles.



Re: __STDC__

2000-07-10 Thread Ian Zimmerman

Note I've sent a carbon to the list as I think this is still relevant.

itz Hmmm.  I have actually solved the compilation problem, and it was
itz unrelated; in other words, __STDC__ _is_ defined during normal
itz compiles.  Any gcc guru here to explain why it doesn't show in
itz the output of the above command?

John I'm not a guru, but...  I can only guess that this is defined
John internally by the compiler.  Only things that may change between
John machines and compiler versions would be defined externally
John like this. These defines are normally in a spec file
John somewhere. gcc -v will tell you where the spec file is, under
John /usr/lib/gcc-lib somewhere IIRC. The useful ones are the
John architecture/CPU/binary formats, although we don't normally need
John to worry about these unless you're embedding assembly code or
John doing some cunning tweak.

I know where my specs it, I checked it and this symbol is not
mentioned.

John I initially thought that maybe the -ansi flag was needed, but
John this defines __STRICT_ANSI__.

I travelled the same road ..

John so gcc's pre-processor defines a whole lot of macros.

Yes, but according to the info file spitting _all of them_ out is
exactly what the -dM flag should do.

-- 
Ian Zimmerman, Oakland, California, U.S.A.
In his own soul a man bears the source
from which he draws all his sorrows and his joys.
Sophocles.