diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-04-19 18:10:56 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-04-19 18:10:56 +0100 |
commit | aa50850225d70521ace3948a8e5858425a918f6a (patch) | |
tree | 311d607f4a7b5f177b00f2193802a219b80ccc5e /gcc | |
parent | b6fa5b01018ac42682f8d69fff9e48f50b87c910 (diff) | |
download | gcc-aa50850225d70521ace3948a8e5858425a918f6a.zip gcc-aa50850225d70521ace3948a8e5858425a918f6a.tar.gz gcc-aa50850225d70521ace3948a8e5858425a918f6a.tar.bz2 |
re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions)
libcpp:
PR preprocessor/20078
* include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
field.
* include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
(struct cpp_token): Change flags to unsigned short.
* lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
(_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
(cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
tokens.
* macro.c (macro_real_token_count): New.
(enter_macro_context, replace_args): Use macro_real_token_count.
(create_iso_definition): Record whitespace surrounding and digraph
spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
Set extra_tokens and save CPP_PASTE tokens with arg_no set for
multiple consecutive ## tokens.
(_cpp_create_definition): Initialize extra_tokens.
(cpp_macro_definition): Use macro_real_token_count.
gcc/testsuite:
* gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests.
From-SVN: r146352
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/paste16.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/redef4.c | 499 |
3 files changed, 510 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5454921..bb2fab6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-04-19 Joseph Myers <joseph@codesourcery.com> + + PR preprocessor/20078 + * gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests. + 2009-04-19 Eric Botcazou <ebotcazou@adacore.com> * lib/gnat.exp (local_find_gnatmake): Pass --LINK to gnatlink. diff --git a/gcc/testsuite/gcc.dg/cpp/paste16.c b/gcc/testsuite/gcc.dg/cpp/paste16.c new file mode 100644 index 0000000..11aca2b --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/paste16.c @@ -0,0 +1,6 @@ +/* Test multiple consecutive ## tokens. */ +/* { dg-do compile } */ +/* { dg-options "" } */ +#define cat(x,y) x##########y +int abcd; +int *p = &cat(ab,cd); diff --git a/gcc/testsuite/gcc.dg/cpp/redef4.c b/gcc/testsuite/gcc.dg/cpp/redef4.c new file mode 100644 index 0000000..b34635b --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/redef4.c @@ -0,0 +1,499 @@ +/* Test redefinitions differing only in the spelling of paste and + stringify tokens, whitespace around them, or the number of + consecutive paste tokens. */ +/* { dg-do preprocess } */ +/* { dg-options "" } */ + +#define str(x) #x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) #x /* { dg-message "previous definition" } */ +#define str(x) # x /* { dg-warning "redefined" } */ +#undef str +#define str(x) #x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %:x /* { dg-message "previous definition" } */ +#define str(x) #x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %:x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %:x /* { dg-message "previous definition" } */ +#define str(x) # x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %:x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) # x /* { dg-message "previous definition" } */ +#define str(x) #x /* { dg-warning "redefined" } */ +#undef str +#define str(x) # x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) # x /* { dg-message "previous definition" } */ +#define str(x) %: x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %: x /* { dg-message "previous definition" } */ +#define str(x) #x /* { dg-warning "redefined" } */ +#undef str +#define str(x) %: x /* { dg-message "previous definition" } */ +#define str(x) # x /* { dg-warning "redefined" } */ +#undef str + +#define str(x) #x +#define str(x) #x +#undef str +#define str(x) # x +#define str(x) # x +#undef str +#define str(x) %: x +#define str(x) %: x +#undef str +#define str(x) %: x +#define str(x) %: x +#undef str + +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a#x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%:x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a# x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a%: x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a #x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %:x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a # x /* { dg-message "previous definition" } */ +#define astr(x) a %: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a#x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a# x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a%: x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a #x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a %:x /* { dg-warning "redefined" } */ +#undef astr +#define astr(x) a %: x /* { dg-message "previous definition" } */ +#define astr(x) a # x /* { dg-warning "redefined" } */ +#undef astr + +#define astr(x) a#x +#define astr(x) a#x +#undef astr +#define astr(x) a# x +#define astr(x) a# x +#undef astr +#define astr(x) a%: x +#define astr(x) a%: x +#undef astr +#define astr(x) a%: x +#define astr(x) a%: x +#undef astr +#define astr(x) a #x +#define astr(x) a #x +#undef astr +#define astr(x) a %:x +#define astr(x) a %:x +#undef astr +#define astr(x) a # x +#define astr(x) a # x +#undef astr +#define astr(x) a %: x +#define astr(x) a %: x +#undef astr + +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x##y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x## y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ##y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x ## y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x## y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x ##y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */ +#undef cat +#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */ +#define cat(x,y) x ## y /* { dg-warning "redefined" } */ +#undef cat + +#define cat(x,y) x##y +#define cat(x,y) x##y +#undef cat +#define cat(x,y) x## y +#define cat(x,y) x## y +#undef cat +#define cat(x,y) x%:%: y +#define cat(x,y) x%:%: y +#undef cat +#define cat(x,y) x%:%: y +#define cat(x,y) x%:%: y +#undef cat +#define cat(x,y) x ##y +#define cat(x,y) x ##y +#undef cat +#define cat(x,y) x %:%:y +#define cat(x,y) x %:%:y +#undef cat +#define cat(x,y) x ## y +#define cat(x,y) x ## y +#undef cat +#define cat(x,y) x %:%: y +#define cat(x,y) x %:%: y +#undef cat + +#define cat3(x,y,z) x##y##z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x##y####z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x####y##z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x##y## ##z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x##y##%:%:z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y######## ####z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x##y############z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y############z /* { dg-message "previous definition" } */ +#define cat3(x,y,z) x##y########%:%:##z /* { dg-warning "redefined" } */ +#undef cat3 + +#define cat3(x,y,z) x##y##z +#define cat3(x,y,z) x##y##z +#undef cat3 + +#define cat3(x,y,z) x##y####z +#define cat3(x,y,z) x##y####z +#undef cat3 + +#define cat3(x,y,z) x####y##z +#define cat3(x,y,z) x####y##z +#undef cat3 + +#define cat3(x,y,z) x##y## ##z +#define cat3(x,y,z) x##y## ##z +#undef cat3 + +#define cat3(x,y,z) x##y##%:%:z +#define cat3(x,y,z) x##y##%:%:z +#undef cat3 + +#define cat3(x,y,z) x##y######## ####z +#define cat3(x,y,z) x##y######## ####z +#undef cat3 + +#define cat3(x,y,z) x##y############z +#define cat3(x,y,z) x##y############z +#undef cat3 + +#define cat3(x,y,z) x##y########%:%:##z +#define cat3(x,y,z) x##y########%:%:##z +#undef cat3 |