summaryrefslogtreecommitdiff
path: root/gcc/opts.sh
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-06-25 20:43:11 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-06-25 20:43:11 +0000
commitf18754d6403e23cb34e62bb6e09a15a357fa2782 (patch)
tree25f8abe318d6c95cb74e8c8f0c6880e9b296e4bf /gcc/opts.sh
parent37f2200463a45c51ccb631f74439475b135907cf (diff)
downloadgcc-f18754d6403e23cb34e62bb6e09a15a357fa2782.tar.gz
c-opts.c (complain_wrong_lang, [...]): Remove.
* c-opts.c (complain_wrong_lang, write_langs): Remove. (c_common_handle_option): Complaints about wrong language are handled in opts.c now. * opts.c (complain_wrong_lang, write_langs, handle_options): New. (find_opt): Fix thinko. (handle_option): Update prototype. Complain about switches for a different front end. * opts.h (lang_names, handle_options): New. (handle_option): Remove. * opts.sh: Write out language names array. * toplev.c (parse_options_and_default_flags): Use handle_options. From-SVN: r68495
Diffstat (limited to 'gcc/opts.sh')
-rw-r--r--gcc/opts.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/opts.sh b/gcc/opts.sh
index 2bedcfc9e00..2770f080ba0 100644
--- a/gcc/opts.sh
+++ b/gcc/opts.sh
@@ -85,21 +85,26 @@ ${AWK} '
h_file = "'${H_FILE}'"
comma = ","
+ print "/* This file is auto-generated by opts.sh. */\n" > c_file
+ print "#include \"" h_file "\"" >> c_file
+ print "#include \"opts.h\"\n" >> c_file
+ print "const char * const lang_names[] =\n{" >> c_file
+
print "/* This file is auto-generated by opts.sh. */\n" > h_file
for (i = 0; i < n_langs; i++) {
macros[i] = "CL_" langs[i]
gsub( "[^A-Za-z0-9_]", "X", macros[i] )
s = substr(" ", length (macros[i]))
print "#define " macros[i] s " (1 << " i ")" >> h_file
+ print " \"" langs[i] "\"," >> c_file
}
- print "\nenum opt_code\n{" >> h_file
- print "/* This file is auto-generated by opts.sh. */\n" > c_file
- print "#include \"" h_file "\"" >> c_file
- print "#include \"opts.h\"\n" >> c_file
+ print " 0\n};\n" >> c_file
print "const unsigned int cl_options_count = N_OPTS;\n" >> c_file
print "const struct cl_option cl_options[] =\n{" >> c_file
+ print "\nenum opt_code\n{" >> h_file
+
for (i = 0; i < n_opts; i++)
back_chain[i] = "N_OPTS";