summaryrefslogtreecommitdiff
path: root/gcc/genoutput.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 16:26:45 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 16:26:45 +0000
commitc21cb186688bcd68eeb70ada34eeda12df49d6a0 (patch)
treeab17aca54aa642788c3f20715514c17f11e837c1 /gcc/genoutput.c
parent74d81d91c6c2070d07997122c9a7f2b868b75c2d (diff)
downloadgcc-c21cb186688bcd68eeb70ada34eeda12df49d6a0.tar.gz
* genoutput.c (process_template): Add sanity checking for '@' templates.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38220 138bc75d-0d04-0410-961f-82ee72b054a4
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");
}