From c6d79beefdcb198c33bc9bfe6390cfad142aac76 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 13 Dec 2000 17:26:45 +0100 Subject: * genoutput.c (process_template): Add sanity checking for '@' templates. From-SVN: r38220 --- gcc/genoutput.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/genoutput.c') 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"); } -- cgit v1.2.1