Bug 24916 - option -O undocumented in cpp docs
Summary: option -O undocumented in cpp docs
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.1.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 17:52 UTC by Debian GCC Maintainers
Modified: 2005-11-17 18:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2005-11-17 17:52:15 UTC
[forwarded from http://bugs.debian.org/339495]

you can see[1] that cpp supports -O, -O[1-9], -Os options, and these options are meaningful (defining macros). but this is not documented in man page[2] and info[3].

[1]
$ cpp -dM /dev/null | grep OPT
$ cpp -dM -O /dev/null | grep OPT
#define __OPTIMIZE__ 1
$ cpp -dM -Os /dev/null | grep OPT
#define __OPTIMIZE__ 1
#define __OPTIMIZE_SIZE__ 1
$ cpp -dM -O2 /dev/null | grep OPT
#define __OPTIMIZE__ 1

[2] /usr/share/man/man1/cpp-4.0.1.gz
[3] /usr/share/info/cpp-4.0.info.gz
Comment 1 Andrew Pinski 2005-11-17 18:02:18 UTC
The C front-end defines these.
Comment 2 Andrew Pinski 2005-11-17 18:03:43 UTC
They are documented:
http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
Comment 3 Andrew Pinski 2005-11-17 18:04:19 UTC
Since they are documented, I am going to close this as invalid.
Comment 4 Andrew Pinski 2005-11-17 18:05:33 UTC
And have been since 3.1:
http://gcc.gnu.org/onlinedocs/gcc-3.1/cpp/Common-Predefined-Macros.html
Comment 5 Debian GCC Maintainers 2005-11-17 18:26:21 UTC
(In reply to comment #2)
> They are documented:
> http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

the point of the bug submitter was to have them documented in cpp(1).

  Matthias
Comment 6 Andrew Pinski 2005-11-17 18:33:21 UTC
(In reply to comment #5)
> the point of the bug submitter was to have them documented in cpp(1).

But they are documented in the info page:
Predefined Macros

* Standard Predefined Macros::
* Common Predefined Macros::
* System-specific Predefined Macros::
* C++ Named Operators::

Which is not what the submitted said.
Comment 7 Andrew Pinski 2005-11-17 18:34:47 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > the point of the bug submitter was to have them documented in cpp(1).
> But they are documented in the info page:

I should point out the web page is generated via the same document that the info page is generated from.