From b8bdbf1625d565a15fe3e6838ce6bb9282aa1608 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sat, 2 Jul 1994 16:13:19 -0700 Subject: (yylex): Reject imaginary numbers when pedantic. From-SVN: r7646 --- gcc/c-lex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc') diff --git a/gcc/c-lex.c b/gcc/c-lex.c index d83f16a..17d50be 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1330,6 +1330,8 @@ yylex () case 'i': case 'I': if (imag) error ("more than one `i' or `j' in numeric constant"); + else if (pedantic) + pedwarn ("ANSI C forbids imaginary numeric constants"); imag = 1; break; @@ -1458,6 +1460,8 @@ yylex () { if (spec_imag) error ("more than one `i' or `j' in numeric constant"); + else if (pedantic) + pedwarn ("ANSI C forbids imaginary numeric constants"); spec_imag = 1; } else -- cgit v1.1