Bug 26168 - improve comment about adding command line options
Summary: improve comment about adding command line options
Status: RESOLVED DUPLICATE of bug 19180
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.0.1
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-08 02:31 UTC by phr-gcc@nightsong.com
Modified: 2007-11-15 17:41 UTC (History)
4 users (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 phr-gcc@nightsong.com 2006-02-08 02:31:28 UTC
gcc/gcc.c has a comment at the top that's a guide to adding a command line option.  It's incomplete: it should say to add the new option to c.opt and rebuild the compiler, and then describe how the variable OPT_whatever gets created by the awk scripts during the build process, so you can then check for the option elsewhere in the compiler.  That mechanism doesn't appear documented at all, and took me a while to figure out through code tracing.  Some description in the comment would have been a big help.

Also, the comment at the top of the automatically-generated options.c file says it's generated by "opts.sh" rather than by those awk scripts.  That's a minor thing but updating it wouldn't hurt.
Comment 1 Andrew Pinski 2006-02-08 02:34:11 UTC
I think this is more of a dup of bug 19180 which is the bug about lacking documention about adding an option in general.

Comment 2 Manuel López-Ibáñez 2007-11-15 17:41:02 UTC

*** This bug has been marked as a duplicate of 19180 ***