diff options
author | Simon Martin <simartin@users.sourceforge.net> | 2007-05-23 20:58:34 +0000 |
---|---|---|
committer | Simon Martin <simartin@gcc.gnu.org> | 2007-05-23 20:58:34 +0000 |
commit | 126e073b22db98cbff92b36aaa299f62de46417d (patch) | |
tree | a044b3337600d63cb8999a4a4f4063b685f09fa7 /gcc/testsuite | |
parent | a38e0142a8424e5d53b673ecaaa2976982a84834 (diff) | |
download | gcc-126e073b22db98cbff92b36aaa299f62de46417d.zip gcc-126e073b22db98cbff92b36aaa299f62de46417d.tar.gz gcc-126e073b22db98cbff92b36aaa299f62de46417d.tar.bz2 |
re PR preprocessor/20077 (GCC accepts macro definitions that fail a constraint)
2007-05-23 Simon Martin <simartin@users.sourceforge.net>
PR preprocessor/20077
* macro.c (create_iso_definition): Fixed the method to determine whether
the token-pasting operator appears at the beginning or the end of a macro.
From-SVN: r125000
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/paste15.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 988a41b..03f6112 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-05-23 Simon Martin <simartin@users.sourceforge.net> + + PR preprocessor/20077 + * gcc.dg/cpp/paste15.c: New test. + 2007-05-23 Sandra Loosemore <sandra@codesourcery.com> Nigel Stephens <nigel@mips.com> Richard Sandiford <richard@codesourcery.com> diff --git a/gcc/testsuite/gcc.dg/cpp/paste15.c b/gcc/testsuite/gcc.dg/cpp/paste15.c new file mode 100644 index 0000000..9d4ec36 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/paste15.c @@ -0,0 +1,15 @@ +/* PR preprocessor/20077 */ +/* { dg-do preprocess } */ + +#define a a ## ## /* { dg-error "end of a macro expansion" } */ +#define b() b ## ## /* { dg-error "end of a macro expansion" } */ +#define c c ## /* { dg-error "end of a macro expansion" } */ +#define d() d ## /* { dg-error "end of a macro expansion" } */ + + +#define e ## ## e /* { dg-error "end of a macro expansion" } */ +#define f() ## ## f /* { dg-error "end of a macro expansion" } */ +#define g ## g /* { dg-error "end of a macro expansion" } */ +#define h() ## h /* { dg-error "end of a macro expansion" } */ +#define i ## /* { dg-error "end of a macro expansion" } */ +#define j() ## /* { dg-error "end of a macro expansion" } */ |