aboutsummaryrefslogtreecommitdiff
path: root/gcc/optc-gen.awk
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-04-28 16:52:12 -0400
committerDJ Delorie <dj@gcc.gnu.org>2005-04-28 16:52:12 -0400
commitf7f655c70668e1d6b8e7d438fb8c94d927bcd3ef (patch)
treeaeacd772adaa4ebc4fcc69669e083225f5e6479e /gcc/optc-gen.awk
parentb4ad897d570a81c1c1e92470b66915244bcc7ec9 (diff)
downloadgcc-f7f655c70668e1d6b8e7d438fb8c94d927bcd3ef.zip
gcc-f7f655c70668e1d6b8e7d438fb8c94d927bcd3ef.tar.gz
gcc-f7f655c70668e1d6b8e7d438fb8c94d927bcd3ef.tar.bz2
optc-gen.awk (END): Make sure no variable is defined more than once.
* optc-gen.awk (END): Make sure no variable is defined more than once. * opth-gen.awk (END): Allocate bits on a per-variable basis. Allow for bitfield variables other than target_flags. * doc/options.text (Mask): Document that you may specify a variable other than target_flags. From-SVN: r98940
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r--gcc/optc-gen.awk4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index f458b65..ebf6a44 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -72,9 +72,13 @@ for (i = 0; i < n_opts; i++) {
init = opt_args("Init", flags[i])
if (init != "")
init = " = " init;
+ else if (name in var_seen)
+ continue;
printf ("/* Set by -%s.\n %s */\nint %s%s;\n\n",
opts[i], help[i], name,init)
+
+ var_seen[name] = 1;
}