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
This commit is contained in:
parent
283da1d32d
commit
b43db0b3c0
4 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-12-01 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* cpplib.c (do_ifdef): Add check_eol() call.
|
||||
(do_ifndef): Likewise.
|
||||
|
||||
2000-12-02 Daniel Berlin <dberlin@redhat.com>
|
||||
Bruce Korb <bkorb@gnu.org>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2000-12-01 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* gcc.dg/20001201-1.c: New testcase.
|
||||
|
||||
2000-12-02 Neil Booth <neilb@earthling.net>
|
||||
|
||||
* g++.old-deja/g++.other/externC4.C,
|
||||
|
|
7
gcc/testsuite/gcc.dg/20001201-1.c
Normal file
7
gcc/testsuite/gcc.dg/20001201-1.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-pedantic" } */
|
||||
char *s =
|
||||
"0123456789101214161820222426283032343638404244464850525456586062646668707274767880828486889092949698100103106109112115118121124127130133136139142145148151154157160163166169172175178181184187190193196199202205208211214217220223226229232235238241244247250253256259262265268271274277280283286289292295298301304307310313316319322325328331334337340343346349352355358361364367370373376379382385388391394397400403406409412415418421424427430433436439442445448451454457460463466469472475478481484487490493496499502"
|
||||
"505x"; /* { dg-bogus "greater than the minimum length" } */
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue