summaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-12-13 17:26:45 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2000-12-13 16:26:45 +0000
commitc6d79beefdcb198c33bc9bfe6390cfad142aac76 (patch)
treeab17aca54aa642788c3f20715514c17f11e837c1 /gcc/genoutput.c
parentee84a135f5e6346ac81ac4c345081b451d45e59b (diff)
downloadgcc-c6d79beefdcb198c33bc9bfe6390cfad142aac76.tar.gz
* genoutput.c (process_template): Add sanity checking for '@' templates.
From-SVN: r38220
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r--gcc/genoutput.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index a5674c95279..dc36d465dd6 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -701,6 +701,15 @@ process_template (d, template)
printf ("\",\n");
i++;
}
+ if (i == 1)
+ message_with_line (d->lineno,
+ "'@' is redundant for output template with single alternative");
+ if (i != d->n_alternatives)
+ {
+ message_with_line (d->lineno,
+ "Wrong number of alternatives in the output template");
+ have_error = 1;
+ }
printf ("};\n");
}