This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, C] options generation and language count



2011-09-01  Gary Funck <gary@intrepid.com>

        * opts.c (print_specific_help): Fix off-by-one compare in
        assertion check.
        * opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
        CL_TARGET, CL_COMMON, CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED):
        Increase by +5 to allow for more languages.
        * Makefile.in (options.c): Extract max. number of languages value
        from opts.h, and pass to optc-gen.awk script.
        * optc-gen.awk: Use max_lang value and issue error if number of
        languages exceeds implementation-defined limit.

This patch extracts the shift count used in the definition of
CL_PARAMS to determine the maximum number of language supported
by the implementation.  optc-gen.awk implements the check and
will exit with an error if the number of languages exceeds the limit.

Patch, attached.  Please review.

Thanks,

- Gary

Attachment: optc-gen-lang-check.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]