diff options
author | Gary Funck <gary@intrepid.com> | 2011-09-02 21:19:17 +0000 |
---|---|---|
committer | Gary Funck <gfunck@gcc.gnu.org> | 2011-09-02 21:19:17 +0000 |
commit | 58265ea647cc3d461d5ecb0b6f7ee7a20adf8be1 (patch) | |
tree | f7d31cb76ec49cf7d2ed94711ee6111092b65896 /gcc/optc-gen.awk | |
parent | dde460d482fcf150d17b0baa2bc0b97714ec6365 (diff) | |
download | gcc-58265ea647cc3d461d5ecb0b6f7ee7a20adf8be1.zip gcc-58265ea647cc3d461d5ecb0b6f7ee7a20adf8be1.tar.gz gcc-58265ea647cc3d461d5ecb0b6f7ee7a20adf8be1.tar.bz2 |
opts.c (print_specific_help): Fix off-by-one compare in assertion check.
2011-09-02 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.
* optc-gen.awk: Generate #if that ensures that the number of
languages is within the implementation-defined limit.
From-SVN: r178491
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r-- | gcc/optc-gen.awk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 71a03fb..e28c397 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -169,6 +169,9 @@ for (i = 0; i < n_langs; i++) { print " 0\n};\n" print "const unsigned int cl_options_count = N_OPTS;\n" +print "#if (1U << " n_langs ") > CL_MIN_OPTION_CLASS" +print " #error the number of languages exceeds the implementation limit" +print "#endif" print "const unsigned int cl_lang_count = " n_langs ";\n" print "const struct cl_option cl_options[] =\n{" |