cpphash.c (trad_stringify): Adjust p after stringification as well.

* cpphash.c (trad_stringify): Adjust p after stringification as
	well.

	* gcc.dg/cpp-tradstringify.c: New test.

From-SVN: r33612
This commit is contained in:
Jakub Jelinek 2000-05-02 18:33:44 +02:00 committed by Jakub Jelinek
parent c56c2073a6
commit 9900f597fa
4 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2000-05-02 Jakub Jelinek <jakub@redhat.com>
* cpphash.c (trad_stringify): Adjust p after stringification as
well.
2000-05-02 Zack Weinberg <zack@wolery.cumb.org>
* cpplib.h (CPP_POP, parse_cleanup_t): Delete.

View File

@ -433,6 +433,7 @@ trad_stringify (pfile, base, len, argc, argv, pat, endpat, last)
argv[i].rest_arg);
last = CPP_WRITTEN (pfile);
base = p + argv[i].len;
p = base;
goto proceed;
}
p++;

View File

@ -2,6 +2,7 @@
* gcc.c-torture/compile/20000502-1.c: New test.
* g++.old-deja/g++.other/align.C: New test.
* gcc.dg/cpp-tradstringify.c: New test.
Sun Apr 23 14:41:33 2000 Jeffrey A Law (law@cygnus.com)

View File

@ -0,0 +1,4 @@
/* Test whether traditional stringify works. */
/* { dg-do preprocess } */
/* { dg-options "-traditional" } */
#define foo(a, b) c="a"; d="b";