public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/10659: docs need list of '#define' values generated by compiler
@ 2003-05-07 7:22 neil
0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2003-05-07 7:22 UTC (permalink / raw)
To: bobf, gcc-bugs, gcc-prs, nobody
Synopsis: docs need list of '#define' values generated by compiler
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed May 7 07:22:44 2003
State-Changed-Why:
You can get a list of predefined macros and there expansions with -E -dM, viz:
echo '' | gcc -E -dM
This doesn't list built-ins like __LINE__ or __FILE__ which are variable. They are documented in the CPP docs at
http://gcc.gnu.org/onlinedocs/gcc-3.2.2/cpp/Predefined-Macros.html#Predefined%20Macros
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10659
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: other/10659: docs need list of '#define' values generated by compiler
@ 2003-05-07 7:26 Andris Pavenis
0 siblings, 0 replies; 3+ messages in thread
From: Andris Pavenis @ 2003-05-07 7:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR other/10659; it has been noted by GNATS.
From: Andris Pavenis <pavenis@latnet.lv>
To: bobf@mrp3.com, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: other/10659: docs need list of '#define' values generated by compiler
Date: Wed, 7 May 2003 10:27:23 +0300
On Wednesday 07 May 2003 09:29, bobf@mrp3.com wrote:
> >Number: 10659
> >Category: other
> >Synopsis: docs need list of '#define' values generated by compiler
> >Confidential: no
> >Severity: non-critical
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: doc-bug
> >Submitter-Id: net
> >Arrival-Date: Wed May 07 06:36:00 UTC 2003
> >Closed-Date:
> >Last-Modified:
> >Originator: bob frazier
> >Release: gcc 3.2.2 manual (on line)
> >Organization:
> >Environment:
>
> N/A (on-line documentation)
>
> >Description:
>
> I was unable to locate a page that described which pre-defined symbols were
> generated by the compiler. In some cases symbols (such as __STDC__ ) were
> mentioned in passing, but in no way could I find symbols to indicate what
> the CPU options were, optimization level of the compiler, or even simple
> ones like '__LINE__' (which you assume should be there) or '__cplusplus'
> (if the C++ compiler is being invoked, for 'dual use' headers). I am not
> even sure if I can rely on the use of '__cplusplus' either which is one of
> the things I was looking for. The other was the CPU type so that for SOME
> cpu's I'd have one kind of in-line assembler, and for other cpu's I'd have
> another kind, and for the rest I'd use C language (as an example).
>
> So, someplace in the documentation, please list all of the '#define'
> constants that the compiler generates, and the options that control them.
> Having them all on a single page would be nice...
>
> >How-To-Repeat:
>
> reference: http://gcc.gnu.org/onlinedocs/gcc-3.2.2/gcc/
>
> >Fix:
>
> recommend adding page with '#define's generated by the compiler (based on
> compiler options or the actual language compilers being run).
There is easy way how to get them (example for C on machine where I'm writing
these lines, for C++ use '-x c++' instead of '-x c').
Andris
andris@geomets2:~$ gcc -E -dD -x c /dev/null | grep ^#de
#define __VERSION__ "3.2.2"
#define __USER_LABEL_PREFIX__
#define __REGISTER_PREFIX__
#define __HAVE_BUILTIN_SETJMP__ 1
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ long int
#define __WINT_TYPE__ unsigned int
#define __STDC__ 1
#define __GNUC__ 3
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 2
#define __GXX_ABI_VERSION 102
#define __ELF__ 1
#define unix 1
#define __gnu_linux__ 1
#define linux 1
#define __ELF__ 1
#define __unix__ 1
#define __gnu_linux__ 1
#define __linux__ 1
#define __unix 1
#define __linux 1
#define __NO_INLINE__ 1
#define __STDC_HOSTED__ 1
#define i386 1
#define __i386 1
#define __i386__ 1
#define __tune_i386__ 1
^ permalink raw reply [flat|nested] 3+ messages in thread
* other/10659: docs need list of '#define' values generated by compiler
@ 2003-05-07 6:36 bobf
0 siblings, 0 replies; 3+ messages in thread
From: bobf @ 2003-05-07 6:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 10659
>Category: other
>Synopsis: docs need list of '#define' values generated by compiler
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed May 07 06:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: bob frazier
>Release: gcc 3.2.2 manual (on line)
>Organization:
>Environment:
N/A (on-line documentation)
>Description:
I was unable to locate a page that described which pre-defined symbols were generated by the compiler. In some cases symbols (such as __STDC__ ) were mentioned in passing, but in no way could I find symbols to indicate what the CPU options were, optimization level of the compiler, or even simple ones like '__LINE__' (which you assume should be there) or '__cplusplus' (if the C++ compiler is being invoked, for 'dual use' headers). I am not even sure if I can rely on the use of '__cplusplus' either which is one of the things I was looking for. The other was the CPU type so that for SOME cpu's I'd have one kind of in-line assembler, and for other cpu's I'd have another kind, and for the rest I'd use C language (as an example).
So, someplace in the documentation, please list all of the '#define' constants that the compiler generates, and the options that control them. Having them all on a single page would be nice...
>How-To-Repeat:
reference: http://gcc.gnu.org/onlinedocs/gcc-3.2.2/gcc/
>Fix:
recommend adding page with '#define's generated by the compiler (based on compiler options or the actual language compilers being run).
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-07 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-07 7:22 other/10659: docs need list of '#define' values generated by compiler neil
-- strict thread matches above, loose matches on Subject: below --
2003-05-07 7:26 Andris Pavenis
2003-05-07 6:36 bobf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).