@@ -2915,6 +2915,15 @@ cpp_avoid_paste (cpp_reader *pfile, cons
|| (CPP_OPTION (pfile, objc)
&& token1->val.str.text[0] == '@'
&& (b == CPP_NAME || b == CPP_STRING)));
+ case CPP_STRING:
+ case CPP_WSTRING:
+ case CPP_UTF8STRING:
+ case CPP_STRING16:
+ case CPP_STRING32: return (CPP_OPTION (pfile, user_literals)
+ && (b == CPP_NAME
+ || (TOKEN_SPELL (token2) == SPELL_LITERAL
+ && ISIDST (token2->val.str.text[0]))));
+
default: break;
}
@@ -0,0 +1,14 @@
+// PR preprocessor/57757
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+#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);
+}
@@ -0,0 +1,15 @@
+// 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);
+}