From: Geoffrey Keating Date: Sat, 2 Dec 2000 22:28:44 +0000 (+0000) Subject: cpplib.c (do_ifdef): Add check_eol() call. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b43db0b3c0184f5c6901865f5d30ba2a704e412b;p=platform%2Fupstream%2Fgcc.git cpplib.c (do_ifdef): Add check_eol() call. * cpplib.c (do_ifdef): Add check_eol() call. (do_ifndef): Likewise. * gcc.dg/20001201-1.c: New testcase. From-SVN: r37960 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 97fd77a..6a08a83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-12-01 Geoffrey Keating + + * cpplib.c (do_ifdef): Add check_eol() call. + (do_ifndef): Likewise. + 2000-12-02 Daniel Berlin Bruce Korb diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 2eaf755..d4b243f 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1221,6 +1221,9 @@ do_ifdef (pfile) if (node) skip = node->type != NT_MACRO; + + if (node) + check_eol (pfile); } push_conditional (pfile, skip, T_IFDEF, 0); @@ -1238,6 +1241,9 @@ do_ifndef (pfile) node = lex_macro_node (pfile); if (node) skip = node->type == NT_MACRO; + + if (node) + check_eol (pfile); } push_conditional (pfile, skip, T_IFNDEF, node); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b5b35b..367f5d8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-12-01 Geoffrey Keating + + * gcc.dg/20001201-1.c: New testcase. + 2000-12-02 Neil Booth * g++.old-deja/g++.other/externC4.C, diff --git a/gcc/testsuite/gcc.dg/20001201-1.c b/gcc/testsuite/gcc.dg/20001201-1.c new file mode 100644 index 0000000..195801a --- /dev/null +++ b/gcc/testsuite/gcc.dg/20001201-1.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ +char *s = +"0123456789101214161820222426283032343638404244464850525456586062646668707274767880828486889092949698100103106109112115118121124127130133136139142145148151154157160163166169172175178181184187190193196199202205208211214217220223226229232235238241244247250253256259262265268271274277280283286289292295298301304307310313316319322325328331334337340343346349352355358361364367370373376379382385388391394397400403406409412415418421424427430433436439442445448451454457460463466469472475478481484487490493496499502" +"505x"; /* { dg-bogus "greater than the minimum length" } */ + +