rich_location rich_loc (line_table, tok->location);
rich_loc.add_range (last_tok_loc);
error_at (&rich_loc,
- "unsupported non-standard concatenation "
- "of string literals");
+ "concatenation of string literals with "
+ "conflicting encoding prefixes");
}
}
--- /dev/null
+// Test from P2201R1
+// { dg-do compile { target c++11 } }
+
+void f() {
+
+ { auto a = L"" u""; } // { dg-error "concatenation" }
+ { auto a = L"" u8""; } // { dg-error "concatenation" }
+ { auto a = L"" U""; } // { dg-error "concatenation" }
+
+ { auto a = u8"" L""; } // { dg-error "concatenation" }
+ { auto a = u8"" u""; } // { dg-error "concatenation" }
+ { auto a = u8"" U""; } // { dg-error "concatenation" }
+
+ { auto a = u"" L""; } // { dg-error "concatenation" }
+ { auto a = u"" u8""; } // { dg-error "concatenation" }
+ { auto a = u"" U""; } // { dg-error "concatenation" }
+
+ { auto a = U"" L""; } // { dg-error "concatenation" }
+ { auto a = U"" u""; } // { dg-error "concatenation" }
+ { auto a = U"" u8""; } // { dg-error "concatenation" }
+}