summaryrefslogtreecommitdiff
path: root/gcc/optc-gen.awk
diff options
context:
space:
mode:
authorgfunck <gfunck@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-02 21:19:17 +0000
committergfunck <gfunck@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-02 21:19:17 +0000
commit634b1f856f3cead5bc8370fbcc22077d2505c26a (patch)
treef7d31cb76ec49cf7d2ed94711ee6111092b65896 /gcc/optc-gen.awk
parentbc83f58704de603dcd6863a3e2f9dcc994b6c14f (diff)
downloadgcc-634b1f856f3cead5bc8370fbcc22077d2505c26a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r--gcc/optc-gen.awk3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 71a03fbdcb6..e28c397f48a 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{"