cpptrad.c: Update comment.
* cpptrad.c: Update comment. testsuite: * gcc.dg/cpp/trad/directive.c: Add test. * gcc.dg/cpp/trad/macroargs.c: Add test. * gcc.dg/cpp/trad/recurse-3.c: Add tests. From-SVN: r55196
This commit is contained in:
parent
ba57a9c052
commit
0879540b3d
6 changed files with 35 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-07-03 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* cpptrad.c: Update comment.
|
||||
|
||||
2002-07-02 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* doc/cpp.texi: Update for traditional preprocessing changes.
|
||||
|
|
|
@ -491,7 +491,8 @@ scan_out_logical_line (pfile, macro)
|
|||
if ((lex_state == ls_fun_open || lex_state == ls_fun_close)
|
||||
&& !pfile->state.in_directive)
|
||||
{
|
||||
/* Newlines in arguments become a space. */
|
||||
/* Newlines in arguments become a space, but we don't
|
||||
clear any in-progress quote. */
|
||||
if (lex_state == ls_fun_close)
|
||||
out[-1] = ' ';
|
||||
continue;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-07-03 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* gcc.dg/cpp/trad/directive.c: Add test.
|
||||
* gcc.dg/cpp/trad/macroargs.c: Add test.
|
||||
* gcc.dg/cpp/trad/recurse-3.c: Add tests.
|
||||
|
||||
2002-07-02 Neil Booth <neil@daikokuya.co.uk>
|
||||
|
||||
* gcc.dg/cpp/cmdlne-M.c: New test.
|
||||
|
|
|
@ -10,3 +10,11 @@
|
|||
#if 0 /* { dg-bogus "unterminated" } */
|
||||
|
||||
#wrong /* { dg-error "invalid" } */
|
||||
|
||||
#define foo 2
|
||||
#define bar + 3
|
||||
#define foobar 6
|
||||
|
||||
#if foo/**/bar != 5
|
||||
# error Comments in directive is a separator /* { dg-bogus "error" } */
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
#define f(x, y) "x y"
|
||||
#define g(x) x
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
|
@ -20,5 +21,10 @@ foo
|
|||
if (strcmp (str1, str2))
|
||||
abort ();
|
||||
|
||||
/* Verify that quoted state is preserved over a newline. */
|
||||
if (strcmp (g /* { dg-bogus "unterminated 2" } */ ("1
|
||||
, 2"), "1 , 2"))
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,3 +14,12 @@ f(f,f,f,f,f,f,f,f,f) /* { dg-bogus "detected recursion" } */
|
|||
sources so let's try it too. */
|
||||
#define foo(x,y) bar (x (y,0), y)
|
||||
foo (foo, baz); /* { dg-bogus "detected recursion" } */
|
||||
|
||||
#define mac mac/**/ro
|
||||
mac /* { dg-bogus "detected recursion" } */
|
||||
|
||||
#define mac2 mac2
|
||||
"mac2" /* { dg-bogus "detected recursion" } */
|
||||
|
||||
#define macro "macro
|
||||
macro mac2 /* { dg-bogus "detected recursion" } */
|
||||
|
|
Loading…
Add table
Reference in a new issue