On Mon, 29 Aug 2011, Gary Funck wrote: > 1) The sanity check should probably read: > gcc_assert ((1U << cl_lang_count) <= CL_MIN_OPTION_CLASS); > In other words, it is off-by-one.
Please send a patch. > 2) The fixed shift counts starting at CL_PARAMS probably need to be > adjusted upwards to allow for more languages. Plese send a patch. I moved lots of flags to bit-fields so there is now plenty of room to move flags up. > A third problem, is that this sort of error would be better detected > at build time rather than waiting to run a DejaGNU test to find it. Please send a patch. Making optc-gen.awk or opth-gen.awk output #if conditions surrounding a #error would be the usual approach. > Also, the use of fixed masks is problematic. Perhaps the AWK script > could be changed to also generate values for CL_PARAMS, etc., ensuring > that will not conflict with the language mask values? That sounds riskier (and does everywhere using opts.h actually need the generated options.h as well?), although in principle it ought to be possible to assign this automatically (and actually only CL_DRIVER, CL_TARGET and CL_COMMON should really need bits assigned, though avoiding the others would require a --help rework). -- Joseph S. Myers jos...@codesourcery.com