On Sat, 2013-02-02 at 11:38 -0800, Ian Lance Taylor wrote: > On Sat, Feb 2, 2013 at 11:03 AM, Brian Drummond > <brian@xxxxxxxxxxxxxxxxxx> wrote: > The option processing has been overhauled so that the driver can do > the right thing more often. All the language-specific options are > passed to the AWK script opt-gather.awk. It produces a file > optionlist, which is then processed by additional AWK scripts into > options.h, options.c, and options-save.c. optionlist contains three lines for -P and two aliased to it which look reasonable to me. ---------------------------------------------------------------------- -no-line-commandsC ObjC C++ ObjC++ Alias(P) -no-line-commandsFortran Alias(P) ... PC ObjC C++ ObjC++Do not generate #line directives PFortran Pvhdl Joined-P<dir> Add <dir> to the end of the vhdl library path ---------------------------------------------------------------------- options.h contains one obviously relevant line ---------------------------------------------------------------------- OPT_P = 155, /* -P */ ---------------------------------------------------------------------- options.c (redacted) looks screwy to me in a couple of respects: 1) OPT_P is bound to only --no-line-commands and not -P 2) Fortran, ObjC etc seem to share the VHDL definition. -------------------------------------------------------------- ...line 1029 const struct cl_option cl_options[] { ... line 1558 { "--no-line-commands", 0, 0, 0, NULL, NULL, OPT_P, N_OPTS, 17, -1, CL_C | CL_CXX | CL_Fortran | CL_ObjC | CL_ObjCXX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, CLVC_BOOLEAN, 0 }, ... line 2271 { "-P", "-P<dir> Add <dir> to the end of the vhdl library path", 0, 0, NULL, NULL, N_OPTS, N_OPTS, 1, -1, CL_C | CL_CXX | CL_Fortran | CL_ObjC | CL_ObjCXX | CL_vhdl | CL_JOINED, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, CLVC_STRING, 0 }, { "-Q", ... -------------------------------------------------------------- If the scripts are generating incorrect options.c, are they taking lang-specs.h files into account or is this purely lang.opt (and/or whatever else feeds the awk scripts) that is at fault? There may be new things to do in lang.opt for example. - Brian