summaryrefslogtreecommitdiff
path: root/gcc/optc-gen.awk
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-21 10:43:55 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-21 10:43:55 +0000
commitbd11046c067c9b3bbae45b2723d7bae0ccc99da2 (patch)
tree651676cbef1c8e70dd0202c2989b2ef58678fcd8 /gcc/optc-gen.awk
parent0d8c07f78603884b20cb9fd6a07879d382565449 (diff)
downloadgcc-bd11046c067c9b3bbae45b2723d7bae0ccc99da2.tar.gz
2012-05-21 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 187704 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@187706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r--gcc/optc-gen.awk24
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 1d46a5dc3c9..0abe6bcf2a8 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -391,10 +391,14 @@ for (i = 0; i < n_enabledby; i++) {
n_enables = split(enables[enabledby_name], thisenable, ",");
for (j = 1; j < n_enables; j++) {
opt_var_name = var_name(flags[opt_numbers[thisenable[j]]]);
- print " if (!opts_set->x_" opt_var_name ")"
- print " handle_generated_option (opts, opts_set,"
- print " " opt_enum(thisenable[j]) ", NULL, value,"
- print " lang_mask, kind, loc, handlers, dc);"
+ if (opt_var_name != "") {
+ print " if (!opts_set->x_" opt_var_name ")"
+ print " handle_generated_option (opts, opts_set,"
+ print " " opt_enum(thisenable[j]) ", NULL, value,"
+ print " lang_mask, kind, loc, handlers, dc);"
+ } else {
+ print "#error " thisenable[j] " does not have a Var() flag"
+ }
}
print " break;\n"
}
@@ -430,10 +434,14 @@ for (i = 0; i < n_langs; i++) {
n_enables = split(enables[lang_name,enabledby_name], thisenable, ",");
for (j = 1; j < n_enables; j++) {
opt_var_name = var_name(flags[opt_numbers[thisenable[j]]]);
- print " if (!opts_set->x_" opt_var_name ")"
- print " handle_generated_option (opts, opts_set,"
- print " " opt_enum(thisenable[j]) ", arg, value,"
- print " lang_mask, kind, loc, handlers, dc);"
+ if (opt_var_name != "") {
+ print " if (!opts_set->x_" opt_var_name ")"
+ print " handle_generated_option (opts, opts_set,"
+ print " " opt_enum(thisenable[j]) ", arg, value,"
+ print " lang_mask, kind, loc, handlers, dc);"
+ } else {
+ print "#error " thisenable[j] " does not have a Var() flag"
+ }
}
print " break;\n"
}