From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26380 invoked by alias); 8 Feb 2006 02:31:30 -0000 Received: (qmail 26348 invoked by uid 48); 8 Feb 2006 02:31:28 -0000 Date: Wed, 08 Feb 2006 02:31:00 -0000 Subject: [Bug driver/26168] New: improve comment about adding command line options X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "phr-gcc at nightsong dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00723.txt.bz2 List-Id: 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. -- Summary: improve comment about adding command line options Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: phr-gcc at nightsong dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26168