From: Jim Wilson Date: Sat, 2 Jul 1994 23:13:19 +0000 (-0700) Subject: (yylex): Reject imaginary numbers when pedantic. X-Git-Tag: misc/cutover-egcs-0~6297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8bdbf1625d565a15fe3e6838ce6bb9282aa1608;p=thirdparty%2Fgcc.git (yylex): Reject imaginary numbers when pedantic. From-SVN: r7646 --- diff --git a/gcc/c-lex.c b/gcc/c-lex.c index d83f16a47c19..17d50bef181a 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