mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
PR preprocessor/57757
* lex.c (cpp_avoid_paste): Avoid pasting CPP_{,W,UTF8}STRING
or CPP_STRING{16,32} with CPP_NAME or SPELL_LITERAL token that
starts if a-zA-Z_.
* g++.dg/cpp/paste1.C: New test.
* g++.dg/cpp/paste2.C: New test.
From-SVN: r200875
16 lines
299 B
C
16 lines
299 B
C
// PR preprocessor/57757
|
|
// { dg-do compile }
|
|
// { dg-options "-std=c++11 -save-temps" }
|
|
// { dg-final cleanup-saved-temps }
|
|
|
|
#define S(x) x
|
|
extern S("C")void exit (int);
|
|
int
|
|
main ()
|
|
{
|
|
(void) (S("foo")and 0);
|
|
const wchar_t *p = S(L"foo")L"bar";
|
|
const char *a = S("foo")R"(bar)";
|
|
exit (0);
|
|
}
|