On Thu, Oct 02, 2003 at 02:24:44PM +1000, Tiwari, Rajnish wrote:
> How can I quickly find out what internal #defines are
> set by gcc during compile ?
[EMAIL PROTECTED] ~]$ touch tmp.c
[EMAIL PROTECTED] ~]$ gcc -E -dM tmp.c
#define __USER_LABEL_PREFIX__
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __HAVE_BUILTIN_SETJMP__ 1
#define __i386 1
#define __GNUC_PATCHLEVEL__ 0
#define __ELF__ 1
#define __WCHAR_TYPE__ long int
#define __NO_INLINE__ 1
#define __GNUC_MINOR__ 96
#define __WINT_TYPE__ unsigned int
#define __tune_i386__ 1
#define __unix 1
#define unix 1
#define __REGISTER_PREFIX__
#define __linux 1
#define __GNUC__ 2
#define i386 1
#define __linux__ 1
#define __VERSION__ "2.96 20000731 (Red Hat Linux 7.3 2.96-113)"
#define __i386__ 1
#define linux 1
#define __unix__ 1
If you give it a real source file, you'll get *all* the #defines from
that file and everything it includes.
Cheers,
John
--
whois [EMAIL PROTECTED]
GPG key id: 0xD59C360F
http://kirriwa.net/john/
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug