diff options
120 files changed, 1276 insertions, 1261 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 059cf2e..38bdb76 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2957,12 +2957,12 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \ $(ALL_GTFILES_H) gtype-desc.cc gtype-desc.h version.h \ options.h target-hooks-def.h insn-opinit.h \ common/common-target-hooks-def.h pass-instances.def \ - $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) \ - gimple-match-auto.h generic-match-auto.h \ c-family/c-target-hooks-def.h d/d-target-hooks-def.h \ $(TM_RUST_H) rust/rust-target-hooks-def.h \ case-cfn-macros.h \ cfn-operators.pd omp-device-properties.h +generated_match_files = gimple-match-auto.h generic-match-auto.h \ + $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) # # How to compile object files to run on the build machine. @@ -3146,7 +3146,8 @@ build/genmatch$(build_exeext): BUILD_LIBS += $(LIBINTL) $(LIBICONV) endif build/genmatch$(build_exeext) : $(BUILD_CPPLIB) \ - $(BUILD_ERRORS) build/vec.o build/hash-table.o build/sort.o + build/vec.o build/hash-table.o build/sort.o libcommon.a \ + $(LIBBACKTRACE) # These programs are not linked with the MD reader. build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \ @@ -4575,6 +4576,8 @@ po/gcc.pot: force # objects from $(OBJS) as early as possible, build all their # prerequisites strictly before all objects. $(ALL_HOST_OBJS) : | $(generated_files) +# build/genmatch depends on libcommon.a, so avoid circular dependencies. +$(filter-out $(OBJS-libcommon),$(ALL_HOST_OBJS)) : | $(generated_match_files) # Include the auto-generated dependencies for all host objects. DEPFILES = \ diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc index 4f80e66..fb88a19 100644 --- a/gcc/c-family/c-lex.cc +++ b/gcc/c-family/c-lex.cc @@ -342,7 +342,7 @@ c_common_has_attribute (cpp_reader *pfile, bool std_syntax) if (token->type != CPP_OPEN_PAREN) { cpp_error (pfile, CPP_DL_ERROR, - "missing '(' after \"__has_attribute\""); + "missing %<(%> after %<__has_attribute%>"); return 0; } token = get_token_no_padding (pfile); @@ -464,13 +464,13 @@ c_common_has_attribute (cpp_reader *pfile, bool std_syntax) else { cpp_error (pfile, CPP_DL_ERROR, - "macro \"__has_attribute\" requires an identifier"); + "macro %<__has_attribute%> requires an identifier"); return 0; } if (get_token_no_padding (pfile)->type != CPP_CLOSE_PAREN) cpp_error (pfile, CPP_DL_ERROR, - "missing ')' after \"__has_attribute\""); + "missing %<)%> after %<__has_attribute%>"); return result; } @@ -484,7 +484,7 @@ c_common_lex_availability_macro (cpp_reader *pfile, const char *builtin) if (token->type != CPP_OPEN_PAREN) { cpp_error (pfile, CPP_DL_ERROR, - "missing '(' after \"__has_%s\"", builtin); + "missing %<(%> after %<__has_%s%>", builtin); return 0; } @@ -497,14 +497,14 @@ c_common_lex_availability_macro (cpp_reader *pfile, const char *builtin) if (token->type != CPP_CLOSE_PAREN) { cpp_error (pfile, CPP_DL_ERROR, - "expected ')' after \"%s\"", name); + "expected %<)%> after %<%s%>", name); name = ""; } } else { cpp_error (pfile, CPP_DL_ERROR, - "macro \"__has_%s\" requires an identifier", builtin); + "macro %<__has_%s%> requires an identifier", builtin); if (token->type == CPP_CLOSE_PAREN) return 0; } diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 1efd209..2818177 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -31,18 +31,21 @@ along with GCC; see the file COPYING3. If not see #include "hash-set.h" #include "is-a.h" #include "ordered-hash-map.h" +#include "pretty-print.h" +#include "input.h" - -/* Stubs for GGC referenced through instantiations triggered by hash-map. */ -void *ggc_internal_cleared_alloc (size_t, void (*)(void *), - size_t, size_t MEM_STAT_DECL) -{ - return NULL; -} -void ggc_free (void *) +void +fatal (const char *format, ...) { -} + va_list ap; + va_start (ap, format); + fprintf (stderr, "%s: ", progname); + vfprintf (stderr, format, ap); + va_end (ap); + fputc ('\n', stderr); + exit (FATAL_EXIT_CODE); +} /* Global state. */ @@ -52,29 +55,9 @@ unsigned verbose; /* libccp helpers. */ -static class line_maps *line_table; - -/* The rich_location class within libcpp requires a way to expand - location_t instances, and relies on the client code - providing a symbol named - linemap_client_expand_location_to_spelling_point - to do this. - - This is the implementation for genmatch. */ - -expanded_location -linemap_client_expand_location_to_spelling_point (const line_maps *set, - location_t loc, - enum location_aspect) -{ - const struct line_map_ordinary *map; - loc = linemap_resolve_location (set, loc, LRK_SPELLING_LOCATION, &map); - return linemap_expand_location (set, map, loc); -} - static bool #if GCC_VERSION >= 4001 -__attribute__((format (printf, 5, 0))) +__attribute__((format (gcc_diag, 5, 0))) #endif diagnostic_cb (cpp_reader *, enum cpp_diagnostic_level errtype, enum cpp_warning_reason, rich_location *richloc, @@ -86,7 +69,11 @@ diagnostic_cb (cpp_reader *, enum cpp_diagnostic_level errtype, expanded_location loc = linemap_expand_location (line_table, map, location); fprintf (stderr, "%s:%d:%d %s: ", loc.file, loc.line, loc.column, (errtype == CPP_DL_WARNING) ? "warning" : "error"); - vfprintf (stderr, msg, *ap); + pretty_printer pp; + pp.set_output_stream (stderr); + text_info text (msg, ap, errno); + pp_format_verbatim (&pp, &text); + pp_flush (&pp); fprintf (stderr, "\n"); FILE *f = fopen (loc.file, "r"); if (f) @@ -119,7 +106,7 @@ notfound: static void #if GCC_VERSION >= 4001 -__attribute__((format (printf, 2, 3))) +__attribute__((format (gcc_diag, 2, 3))) #endif fatal_at (const cpp_token *tk, const char *msg, ...) { @@ -132,7 +119,7 @@ fatal_at (const cpp_token *tk, const char *msg, ...) static void #if GCC_VERSION >= 4001 -__attribute__((format (printf, 2, 3))) +__attribute__((format (gcc_diag, 2, 3))) #endif fatal_at (location_t loc, const char *msg, ...) { @@ -145,7 +132,7 @@ fatal_at (location_t loc, const char *msg, ...) static void #if GCC_VERSION >= 4001 -__attribute__((format (printf, 2, 3))) +__attribute__((format (gcc_diag, 2, 3))) #endif warning_at (const cpp_token *tk, const char *msg, ...) { @@ -158,7 +145,7 @@ warning_at (const cpp_token *tk, const char *msg, ...) static void #if GCC_VERSION >= 4001 -__attribute__((format (printf, 2, 3))) +__attribute__((format (gcc_diag, 2, 3))) #endif warning_at (location_t loc, const char *msg, ...) { @@ -267,8 +254,8 @@ output_line_directive (FILE *f, location_t location, bool dumpfile = false, bool fnargs = false, bool indirect_line_numbers = false) { - typedef pair_hash<nofree_string_hash, int_hash<int, -1>> location_hash; - static hash_map<location_hash, int> loc_id_map; + typedef pair_hash<nofree_string_hash, int_hash<int, -1>> loc_hash; + static hash_map<loc_hash, int> loc_id_map; const line_map_ordinary *map; linemap_resolve_location (line_table, location, LRK_SPELLING_LOCATION, &map); expanded_location loc = linemap_expand_location (line_table, map, location); @@ -4520,7 +4507,7 @@ parser::eat_ident (const char *s) const cpp_token *token = peek (); const char *t = get_ident (); if (strcmp (s, t) != 0) - fatal_at (token, "expected '%s' got '%s'\n", s, t); + fatal_at (token, "expected %qs got %qs", s, t); return token; } @@ -4588,7 +4575,7 @@ parser::parse_operation (unsigned char &opt_grp) alt_id = xstrdup (id); alt_id[strlen (id) - 1] = '\0'; if (opt_grp == 1) - fatal_at (id_tok, "use '%s?' here", alt_id); + fatal_at (id_tok, "use %<%s?%> here", alt_id); } else opt_grp = 1; @@ -4673,10 +4660,10 @@ parser::parse_expr () if (token->type == CPP_XOR && !(token->flags & PREV_WHITE)) { if (!parsing_match_operand) - fatal_at (token, "modifier '^' is only valid in a match expression"); + fatal_at (token, "modifier %<^%> is only valid in a match expression"); if (!(*e->operation == COND_EXPR)) - fatal_at (token, "modifier '^' can only act on operation COND_EXPR"); + fatal_at (token, "modifier %<^%> can only act on operation %<COND_EXPR%>"); eat_token (CPP_XOR); e->match_phi = true; @@ -5391,7 +5378,7 @@ parser::parse_pattern () { if (active_ifs.length () > 0 || active_fors.length () > 0) - fatal_at (token, "define_predicates inside if or for is not supported"); + fatal_at (token, "%<define_predicates%> inside if or for is not supported"); parse_predicates (token->src_loc); } else if (strcmp (id, "define_operator_list") == 0) @@ -5401,10 +5388,11 @@ parser::parse_pattern () fatal_at (token, "operator-list inside if or for is not supported"); parse_operator_list (token->src_loc); } + else if (active_ifs.length () == 0 && active_fors.length () == 0) + fatal_at (token, "expected %<define_predicates%>, %<simplify%>, " + "%<match%>, %<for%> or %<if%>"); else - fatal_at (token, "expected %s'simplify', 'match', 'for' or 'if'", - active_ifs.length () == 0 && active_fors.length () == 0 - ? "'define_predicates', " : ""); + fatal_at (token, "expected %<simplify%>, %<match%>, %<for%> or %<if%>"); eat_token (CPP_CLOSE_PAREN); } @@ -5446,12 +5434,13 @@ parser::finish_match_operand (operand *op) if (cpts[i][j]->value_match) { if (value_match) - fatal_at (cpts[i][j]->location, "duplicate @@"); + fatal_at (cpts[i][j]->location, "duplicate %s", "@@"); value_match = cpts[i][j]; } } if (cpts[i].length () == 1 && value_match) - fatal_at (value_match->location, "@@ without a matching capture"); + fatal_at (value_match->location, + "%s without a matching capture", "@@"); if (value_match) { /* Duplicate prevailing capture with the existing ID, create diff --git a/gcc/testsuite/c-c++-common/cpp/Wheader-guard-2.c b/gcc/testsuite/c-c++-common/cpp/Wheader-guard-2.c index 9596fe7..ce3608c 100644 --- a/gcc/testsuite/c-c++-common/cpp/Wheader-guard-2.c +++ b/gcc/testsuite/c-c++-common/cpp/Wheader-guard-2.c @@ -6,5 +6,5 @@ int i; -/* { dg-warning "header guard \"WHEADER_GUARD_2\" followed by \"#define\" of a different macro" "" { target *-*-* } 0 } */ -/* { dg-message "\"WHEADERGUARD2\" is defined here; did you mean \"WHEADER_GUARD_2\"\\\?" "" { target *-*-* } 0 } */ +/* { dg-warning "header guard 'WHEADER_GUARD_2' followed by '#define' of a different macro" "" { target *-*-* } 0 } */ +/* { dg-message "'WHEADERGUARD2' is defined here; did you mean 'WHEADER_GUARD_2'\\\?" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/Wheader-guard-3.c b/gcc/testsuite/c-c++-common/cpp/Wheader-guard-3.c index 9fa4fbf..b4b4789 100644 --- a/gcc/testsuite/c-c++-common/cpp/Wheader-guard-3.c +++ b/gcc/testsuite/c-c++-common/cpp/Wheader-guard-3.c @@ -6,5 +6,5 @@ int i; -/* { dg-warning "header guard \"WHEADER_GUARD_3\" followed by \"#define\" of a different macro" "" { target *-*-* } 0 } */ -/* { dg-message "\"WHEADERGUARD3\" is defined here; did you mean \"WHEADER_GUARD_3\"\\\?" "" { target *-*-* } 0 } */ +/* { dg-warning "header guard 'WHEADER_GUARD_3' followed by '#define' of a different macro" "" { target *-*-* } 0 } */ +/* { dg-message "'WHEADERGUARD3' is defined here; did you mean 'WHEADER_GUARD_3'\\\?" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-1.c b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-1.c index 0d5a6a7..72da471 100644 --- a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-1.c +++ b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-1.c @@ -4,40 +4,40 @@ // { dg-options "-finput-charset=UTF-8 -Winvalid-utf8" } // aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } -// a€a { dg-warning "invalid UTF-8 character <80>" } -// a¿a { dg-warning "invalid UTF-8 character <bf>" } -// aÀa { dg-warning "invalid UTF-8 character <c0>" } -// aÁa { dg-warning "invalid UTF-8 character <c1>" } -// aõa { dg-warning "invalid UTF-8 character <f5>" } -// aÿa { dg-warning "invalid UTF-8 character <ff>" } -// aÂa { dg-warning "invalid UTF-8 character <c2>" } -// aàa { dg-warning "invalid UTF-8 character <e0>" } -// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" } -// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" } -// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" } -// aì€a { dg-warning "invalid UTF-8 character <ec><80>" } -// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" } -// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -// að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -// aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" } -// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } -// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +// a€a { dg-warning "invalid UTF-8 character '<80>'" } +// a¿a { dg-warning "invalid UTF-8 character '<bf>'" } +// aÀa { dg-warning "invalid UTF-8 character '<c0>'" } +// aÁa { dg-warning "invalid UTF-8 character '<c1>'" } +// aõa { dg-warning "invalid UTF-8 character '<f5>'" } +// aÿa { dg-warning "invalid UTF-8 character '<ff>'" } +// aÂa { dg-warning "invalid UTF-8 character '<c2>'" } +// aàa { dg-warning "invalid UTF-8 character '<e0>'" } +// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" } +// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" } +// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +// að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +// aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } +// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } +// { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } /* aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } */ -/* a€a { dg-warning "invalid UTF-8 character <80>" } */ -/* a¿a { dg-warning "invalid UTF-8 character <bf>" } */ -/* aÀa { dg-warning "invalid UTF-8 character <c0>" } */ -/* aÁa { dg-warning "invalid UTF-8 character <c1>" } */ -/* aõa { dg-warning "invalid UTF-8 character <f5>" } */ -/* aÿa { dg-warning "invalid UTF-8 character <ff>" } */ -/* aÂa { dg-warning "invalid UTF-8 character <c2>" } */ -/* aàa { dg-warning "invalid UTF-8 character <e0>" } */ -/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" } */ -/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" } */ -/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" } */ -/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" } */ -/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" } */ -/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" } */ -/* að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } */ -/* aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" } */ -/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } */ -/* { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } */ +/* a€a { dg-warning "invalid UTF-8 character '<80>'" } */ +/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" } */ +/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" } */ +/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" } */ +/* aõa { dg-warning "invalid UTF-8 character '<f5>'" } */ +/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" } */ +/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" } */ +/* aàa { dg-warning "invalid UTF-8 character '<e0>'" } */ +/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } */ +/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } */ +/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" } */ +/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" } */ +/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } */ +/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } */ +/* að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } */ +/* aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } */ +/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } */ +/* { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-2.c b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-2.c index 9ab69e1..b63b1d9 100644 --- a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-2.c +++ b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-2.c @@ -11,78 +11,78 @@ typedef __CHAR16_TYPE__ char16_t; typedef __CHAR32_TYPE__ char32_t; #endif -char32_t a = U'€'; // { dg-warning "invalid UTF-8 character <80>" } -char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" } -char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" } -char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" } -char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" } -char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" } -char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" } -char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" } -char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" } -char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" } -char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" } -char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character <ec><80>" } -char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character <ed><a0><80>" } -char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" } -char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } - // { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +char32_t a = U'€'; // { dg-warning "invalid UTF-8 character '<80>'" } +char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" } +char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" } +char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" } +char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" } +char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" } +char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" } +char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" } +char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" } +char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character '<ec><80>'" } +char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } +char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } const char32_t *A = U"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -const char32_t *B = U"€"; // { dg-warning "invalid UTF-8 character <80>" } -const char32_t *C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" } -const char32_t *D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" } -const char32_t *E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" } -const char32_t *F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" } -const char32_t *G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" } -const char32_t *H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" } -const char32_t *I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" } -const char32_t *J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" } -const char32_t *K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" } -const char32_t *L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" } -const char32_t *M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" } -const char32_t *N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" } -const char32_t *O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -const char32_t *P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -const char32_t *Q = U"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" } -const char32_t *R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } - // { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +const char32_t *B = U"€"; // { dg-warning "invalid UTF-8 character '<80>'" } +const char32_t *C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" } +const char32_t *D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" } +const char32_t *E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" } +const char32_t *F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" } +const char32_t *G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" } +const char32_t *H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" } +const char32_t *I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" } +const char32_t *J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +const char32_t *K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +const char32_t *L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" } +const char32_t *M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" } +const char32_t *N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +const char32_t *O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +const char32_t *P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +const char32_t *Q = U"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } +const char32_t *R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } const char32_t *A1 = UR"(Â€ß¿à €íŸ¿î€€ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" } -const char32_t *B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" } -const char32_t *C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" } -const char32_t *D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" } -const char32_t *E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" } -const char32_t *F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" } -const char32_t *G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" } -const char32_t *H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" } -const char32_t *I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" } -const char32_t *J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" } -const char32_t *K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" } -const char32_t *L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" } -const char32_t *M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" } -const char32_t *N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" } -const char32_t *O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -const char32_t *P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -const char32_t *Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" } -const char32_t *R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } - // { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +const char32_t *B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" } +const char32_t *C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" } +const char32_t *D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" } +const char32_t *E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" } +const char32_t *F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" } +const char32_t *G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" } +const char32_t *H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" } +const char32_t *I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" } +const char32_t *J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +const char32_t *K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +const char32_t *L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" } +const char32_t *M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" } +const char32_t *N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +const char32_t *O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +const char32_t *P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +const char32_t *Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } +const char32_t *R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } const char *A2 = u8"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -const char *B2 = u8"€"; // { dg-warning "invalid UTF-8 character <80>" } -const char *C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" } -const char *D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" } -const char *E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" } -const char *F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" } -const char *G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" } -const char *H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" } -const char *I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" } -const char *J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" } -const char *K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" } -const char *L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" } -const char *M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" } -const char *N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" } -const char *O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -const char *P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -const char *Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" } -const char *R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } - // { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +const char *B2 = u8"€"; // { dg-warning "invalid UTF-8 character '<80>'" } +const char *C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" } +const char *D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" } +const char *E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" } +const char *F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" } +const char *G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" } +const char *H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" } +const char *I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" } +const char *J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +const char *K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +const char *L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" } +const char *M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" } +const char *N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +const char *O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +const char *P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +const char *Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" } +const char *R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-3.c b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-3.c index 4cb230f..444a350 100644 --- a/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-3.c +++ b/gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-3.c @@ -6,22 +6,22 @@ #define I(x) I(Â€ß¿à €íŸ¿î€€ð€€ô¿¿) // { dg-bogus "invalid UTF-8 character" } // { dg-error "is not valid in an identifier" "" { target c++ } .-1 } -I(€) // { dg-warning "invalid UTF-8 character <80>" } -I(¿) // { dg-warning "invalid UTF-8 character <bf>" } -I(À) // { dg-warning "invalid UTF-8 character <c0>" } -I(Á) // { dg-warning "invalid UTF-8 character <c1>" } -I(õ) // { dg-warning "invalid UTF-8 character <f5>" } -I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" } -I(Â) // { dg-warning "invalid UTF-8 character <c2>" } -I(à) // { dg-warning "invalid UTF-8 character <e0>" } -I(à€¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" } -I(àŸ€) // { dg-warning "invalid UTF-8 character <e0><9f><80>" } -I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" } -I(ì€) // { dg-warning "invalid UTF-8 character <ec><80>" } -I(í €) // { dg-warning "invalid UTF-8 character <ed><a0><80>" } -I(ð€€€) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" } -I(ð¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } -I(ô€€) // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c } } +I(€) // { dg-warning "invalid UTF-8 character '<80>'" } +I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" } +I(À) // { dg-warning "invalid UTF-8 character '<c0>'" } +I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" } +I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" } +I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" } +I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" } +I(à) // { dg-warning "invalid UTF-8 character '<e0>'" } +I(à€¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } +I(àŸ€) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } +I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" } +I(ì€) // { dg-warning "invalid UTF-8 character '<ec><80>'" } +I(í €) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } +I(ð€€€) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } +I(ð¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } +I(ô€€) // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c } } // { dg-error "is not valid in an identifier" "" { target c++ } .-1 } -I(ý¿¿¿¿¿) // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c } } +I(ý¿¿¿¿¿) // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c } } // { dg-error "is not valid in an identifier" "" { target c++ } .-1 } diff --git a/gcc/testsuite/c-c++-common/cpp/counter-2.c b/gcc/testsuite/c-c++-common/cpp/counter-2.c index 7d6578d..86d891f 100644 --- a/gcc/testsuite/c-c++-common/cpp/counter-2.c +++ b/gcc/testsuite/c-c++-common/cpp/counter-2.c @@ -10,5 +10,5 @@ #ifdef __COUNTER__ /* Macro not expanded. */ #endif -#if __COUNTER__ == 0 /* { dg-error "__COUNTER__ expanded inside directive with -fdirectives-only" } */ +#if __COUNTER__ == 0 /* { dg-error "'__COUNTER__' expanded inside directive with '-fdirectives-only'" } */ #endif diff --git a/gcc/testsuite/c-c++-common/cpp/embed-16.c b/gcc/testsuite/c-c++-common/cpp/embed-16.c index a3d1a6d..44ed70f 100644 --- a/gcc/testsuite/c-c++-common/cpp/embed-16.c +++ b/gcc/testsuite/c-c++-common/cpp/embed-16.c @@ -6,7 +6,7 @@ #embed __FILE__ gnu::offset (1 / 0) /* { dg-error "division by zero in #embed" } */ #embed __FILE__ __gnu__::__offset__ (+ + +) /* { dg-error "operator '\\\+' has no right operand" } */ #define FOO 1 -#embed __FILE__ gnu::offset(0 + defined(FOO)) /* { dg-error "'defined' in #embed parameter" } */ +#embed __FILE__ gnu::offset(0 + defined(FOO)) /* { dg-error "'defined' in '#embed' parameter" } */ #embed __FILE__ gnu::offset (-1) /* { dg-error "negative embed parameter operand" } */ #embed __FILE__ gnu::offset (-42) /* { dg-error "negative embed parameter operand" } */ #embed __FILE__ gnu::offset (-9223372036854775807 - 1) /* { dg-error "negative embed parameter operand" } */ @@ -19,7 +19,7 @@ #endif #if 1 + __has_embed (__FILE__ gnu::offset(+ + +)) /* { dg-error "operator '\\\+' has no right operand" } */ #endif -#if 1 + __has_embed (__FILE__ gnu::offset(0 + defined(FOO))) /* { dg-error "'defined' in #embed parameter" } */ +#if 1 + __has_embed (__FILE__ gnu::offset(0 + defined(FOO))) /* { dg-error "'defined' in '#embed' parameter" } */ #endif #if 1 + __has_embed (__FILE__ gnu::offset (-1)) /* { dg-error "negative embed parameter operand" } */ #endif diff --git a/gcc/testsuite/c-c++-common/cpp/embed-18.c b/gcc/testsuite/c-c++-common/cpp/embed-18.c index e9cefbe..67bbe87 100644 --- a/gcc/testsuite/c-c++-common/cpp/embed-18.c +++ b/gcc/testsuite/c-c++-common/cpp/embed-18.c @@ -23,9 +23,9 @@ #embed "." gnu::base64("\u{53}\u{41}\u{3d}\u{00003d}") /* { dg-error "'gnu::base64' argument not valid base64 encoded string" } */ #embed "." gnu::base64("\U00000053\U00000041\U0000003d\U0000003d") /* { dg-error "'gnu::base64' argument not valid base64 encoded string" } */ #embed "." gnu::base64("\N{LATIN CAPITAL LETTER S}\N{LATIN CAPITAL LETTER A}\N{LATIN CAPITAL LETTER A}\N{LATIN CAPITAL LETTER A}") /* { dg-error "'gnu::base64' argument not valid base64 encoded string" } */ -#embed "embed-18.c" gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with \\\".\\\"" } */ -#embed <embed-18.c> gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with \\\".\\\"" } */ -#embed <.> gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with \\\".\\\"" } */ +#embed "embed-18.c" gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with '\\\".\\\"'" } */ +#embed <embed-18.c> gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with '\\\".\\\"'" } */ +#embed <.> gnu::base64("SA==") /* { dg-error "'gnu::base64' parameter can be only used with '\\\".\\\"'" } */ #embed "." gnu::base64("SA==") limit(3) /* { dg-error "'gnu::base64' parameter conflicts with 'limit' or 'gnu::offset' parameters" } */ #embed "." gnu::base64("SA==") gnu::offset(1) /* { dg-error "'gnu::base64' parameter conflicts with 'limit' or 'gnu::offset' parameters" } */ #if 1 + __has_embed ("." gnu::base64("") __gnu__::__base64__("")) /* { dg-error "duplicate embed parameter 'gnu::base64'" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/embed-3.c b/gcc/testsuite/c-c++-common/cpp/embed-3.c index 89ea3fa..30fcde8 100644 --- a/gcc/testsuite/c-c++-common/cpp/embed-3.c +++ b/gcc/testsuite/c-c++-common/cpp/embed-3.c @@ -53,20 +53,20 @@ /* { dg-error "unbalanced '\\\)'" "" { target *-*-* } .-1 } */ /* { dg-error "unbalanced '\\\['" "" { target *-*-* } .-2 } */ /* { dg-error "unbalanced '\\\('" "" { target *-*-* } .-3 } */ -#embed limit(1) /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */ +#embed limit(1) /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */ #define FOO 1 -#embed __FILE__ limit(0 + defined(FOO)) /* { dg-error "'defined' in #embed parameter" } */ -#embed /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */ +#embed __FILE__ limit(0 + defined(FOO)) /* { dg-error "'defined' in '#embed' parameter" } */ +#embed /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */ #embed " /* { dg-warning "missing terminating \\\" character" "" { target *-*-* } .-1 } */ - /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" "" { target *-*-* } .-2 } */ + /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" "" { target *-*-* } .-2 } */ #embed < /* { dg-error "empty filename in #embed" "" { target *-*-* } .-1 } */ -/* { dg-error "missing terminating > character" "" { target *-*-* } .-2 } */ -#embed > /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */ +/* { dg-error "missing terminating '>' character" "" { target *-*-* } .-2 } */ +#embed > /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */ #embed "" /* { dg-error "empty filename in #embed" } */ #embed <> /* { dg-error "empty filename in #embed" } */ -#embed embed-4.c /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */ +#embed embed-4.c /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */ #embed __FILE__ foo: /* { dg-error "expected parameter name" } */ /* { dg-error "unknown embed parameter 'foo'" "" { target *-*-* } .-1 } */ #embed __FILE__ bar:: /* { dg-error "expected parameter name" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/embed-4.c b/gcc/testsuite/c-c++-common/cpp/embed-4.c index 1c2319d..33aa3226 100644 --- a/gcc/testsuite/c-c++-common/cpp/embed-4.c +++ b/gcc/testsuite/c-c++-common/cpp/embed-4.c @@ -2,7 +2,7 @@ /* { dg-options "" } */ #if 1 + __has_embed (__FILE__ , limit(1)) /* { dg-error "expected parameter name" } */ -/* { dg-error "missing binary operator before token \\\"limit\\\"" "" { target *-*-* } .-1 } */ +/* { dg-error "missing binary operator before token 'limit'" "" { target *-*-* } .-1 } */ #endif #if 1 + __has_embed (__FILE__ limit(1) /* { dg-error "expected '\\\)'" } */ #endif @@ -81,35 +81,35 @@ /* { dg-error "expected '\\\)'" "" { target *-*-* } .-3 } */ #endif #define FOO 1 -#if 1 + __has_embed (limit(1)) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */ -/* { dg-error "missing binary operator before token \\\"1\\\"" "" { target *-*-* } .-1 } */ +#if 1 + __has_embed (limit(1)) /* { dg-error "operator '__has_embed' requires a header-name" } */ +/* { dg-error "missing binary operator before token '1'" "" { target *-*-* } .-1 } */ #endif -#if 1 + __has_embed (__FILE__ limit(0 + defined(FOO))) /* { dg-error "'defined' in #embed parameter" } */ +#if 1 + __has_embed (__FILE__ limit(0 + defined(FOO))) /* { dg-error "'defined' in '#embed' parameter" } */ #endif -int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside of preprocessing directive" } */ -#if __has_embed /* { dg-error "missing '\\\(' before \\\"__has_embed\\\" operand" } */ -/* { dg-error "operator \\\"__has_embed\\\" requires a header-name" "" { target *-*-* } .-1 } */ +int a = __has_embed (__FILE__); /* { dg-error "'__has_embed' used outside of preprocessing directive" } */ +#if __has_embed /* { dg-error "missing '\\\(' before '__has_embed' operand" } */ +/* { dg-error "operator '__has_embed' requires a header-name" "" { target *-*-* } .-1 } */ #endif -#if __has_embed( /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */ +#if __has_embed( /* { dg-error "operator '__has_embed' requires a header-name" } */ #endif -#if __has_embed() /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */ +#if __has_embed() /* { dg-error "operator '__has_embed' requires a header-name" } */ #endif #if __has_embed(") /* { dg-warning "missing terminating \\\" character" "" { target *-*-* } .-1 } */ -/* { dg-error "operator \\\"__has_embed\\\" requires a header-name" "" { target *-*-* } .-2 } */ +/* { dg-error "operator '__has_embed' requires a header-name" "" { target *-*-* } .-2 } */ #endif #if __has_embed(<) -/* { dg-error "missing terminating > character" "" { target *-*-* } .-1 } */ +/* { dg-error "missing terminating '>' character" "" { target *-*-* } .-1 } */ /* { dg-error "expected '\\\)'" "" { target *-*-* } .-2 } */ #endif -#if __has_embed(>) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */ +#if __has_embed(>) /* { dg-error "operator '__has_embed' requires a header-name" } */ #endif #if __has_embed("") /* { dg-error "empty filename in '__has_embed'" } */ #endif #if __has_embed(<>) /* { dg-error "empty filename in '__has_embed'" } */ #endif -#if __has_embed(embed-4.c) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */ -/* { dg-error "missing binary operator before token \\\"4.c\\\"" "" { target *-*-* } .-1 } */ +#if __has_embed(embed-4.c) /* { dg-error "operator '__has_embed' requires a header-name" } */ +/* { dg-error "missing binary operator before token '4.c'" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ foo:) /* { dg-error "expected parameter name" } */ /* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */ @@ -120,10 +120,10 @@ int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside /* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ foo:bar) /* { dg-error "expected parameter name" } */ -/* { dg-error "missing binary operator before token \\\"bar\\\"" "" { target *-*-* } .-1 } */ +/* { dg-error "missing binary operator before token 'bar'" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ foo::bar::baz) /* { dg-error "expected parameter name" } */ -/* { dg-error "missing binary operator before token \\\"baz\\\"" "" { target *-*-* } .-1 } */ +/* { dg-error "missing binary operator before token 'baz'" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ foo : : bar) /* { dg-error "expected parameter name" } */ /* { dg-error "':' without preceding '\\\?'" "" { target *-*-* } .-1 } */ @@ -132,7 +132,7 @@ int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside /* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ 42::foo) /* { dg-error "expected parameter name" } */ -/* { dg-error "token \\\"::\\\" is not valid in preprocessor expressions" "" { target *-*-* } .-1 } */ +/* { dg-error "token '::' is not valid in preprocessor expressions" "" { target *-*-* } .-1 } */ #endif #if __has_embed(__FILE__ foo::42) /* { dg-error "expected parameter name" } */ /* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/eof-2.c b/gcc/testsuite/c-c++-common/cpp/eof-2.c index 9cc4fed..4abc57e 100644 --- a/gcc/testsuite/c-c++-common/cpp/eof-2.c +++ b/gcc/testsuite/c-c++-common/cpp/eof-2.c @@ -5,4 +5,4 @@ #define f(x) x #include "eof-2.h" - /* { dg-regexp {[^\n]*eof-2.h:4:21: error: unterminated argument list invoking macro "f"\n} } */ + /* { dg-regexp {[^\n]*eof-2.h:4:21: error: unterminated argument list invoking macro 'f'\n} } */ diff --git a/gcc/testsuite/c-c++-common/cpp/eof-3.c b/gcc/testsuite/c-c++-common/cpp/eof-3.c index e309a54..d95c7760 100644 --- a/gcc/testsuite/c-c++-common/cpp/eof-3.c +++ b/gcc/testsuite/c-c++-common/cpp/eof-3.c @@ -3,6 +3,6 @@ /* { dg-do preprocess } */ /* { dg-additional-options "-include $srcdir/c-c++-common/cpp/eof-2.h" } */ - /* { dg-regexp {[^\n]*eof-2.h:4:21: error: unterminated argument list invoking macro "f"\n} } */ + /* { dg-regexp {[^\n]*eof-2.h:4:21: error: unterminated argument list invoking macro 'f'\n} } */ token ) diff --git a/gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c b/gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c index 134c298..7611dba 100644 --- a/gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c +++ b/gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c @@ -1,4 +1,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fmax-include-depth=1" } */ -#include "fmax-include-depth-1b.h" /* { dg-error ".include nested depth 1 exceeds maximum of 1 .use -fmax-include-depth=DEPTH to increase the maximum." } */ +#include "fmax-include-depth-1b.h" /* { dg-error "'#include' nested depth 1 exceeds maximum of 1 \\\(use '-fmax-include-depth=DEPTH' to increase the maximum\\\)" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/has-builtin.c b/gcc/testsuite/c-c++-common/cpp/has-builtin.c index 9351651..07bcbb7 100644 --- a/gcc/testsuite/c-c++-common/cpp/has-builtin.c +++ b/gcc/testsuite/c-c++-common/cpp/has-builtin.c @@ -6,44 +6,44 @@ # error "__has_builtin is not defined" #endif -#if __has_builtin // { dg-error "missing '\\\(' after \"__has_builtin\"" } +#if __has_builtin // { dg-error "missing '\\\(' after '__has_builtin'" } #endif -#if __has_builtin ( // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin ( // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin () // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin () // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin (1) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin (1) // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin (1, 2) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin (1, 2) // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin (1 + 2) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin (1 + 2) // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin (x, y) // { dg-error "expected '\\\)' after \"x\"" } */ +#if __has_builtin (x, y) // { dg-error "expected '\\\)' after 'x'" } */ #endif -#if __has_builtin (x + 1) // { dg-error "expected '\\\)' after \"x\"" } */ +#if __has_builtin (x + 1) // { dg-error "expected '\\\)' after 'x'" } */ #endif -#if __has_builtin (p->i) // { dg-error "expected '\\\)' after \"p\"" } */ +#if __has_builtin (p->i) // { dg-error "expected '\\\)' after 'p'" } */ #endif -#if __has_builtin ((x)) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin ((x)) // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin ((y) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin ((y) // { dg-error "macro '__has_builtin' requires an identifier" } #endif -#if __has_builtin ((((z) // { dg-error "macro \"__has_builtin\" requires an identifier" } +#if __has_builtin ((((z) // { dg-error "macro '__has_builtin' requires an identifier" } #endif #if __has_builtin (x))) // { dg-error "missing '\\\('" }" #endif -#if __has_builtin (f ()) // { dg-error "expected '\\\)' after \"f\"" }" +#if __has_builtin (f ()) // { dg-error "expected '\\\)' after 'f'" }" #endif diff --git a/gcc/testsuite/c-c++-common/cpp/line-2.c b/gcc/testsuite/c-c++-common/cpp/line-2.c index 3ce2334..c2ee889 100644 --- a/gcc/testsuite/c-c++-common/cpp/line-2.c +++ b/gcc/testsuite/c-c++-common/cpp/line-2.c @@ -8,4 +8,4 @@ int line4; // { dg-regexp {In file included from <command-line>:\n[^\n]*/line-2.h:4:2: error: #error wrong\n} } -// { dg-regexp {[^\n]*/line-2.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3:9: note: macro "bill" defined here\n} } +// { dg-regexp {[^\n]*/line-2.c:3:11: error: macro 'bill' passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3:9: note: macro 'bill' defined here\n} } diff --git a/gcc/testsuite/c-c++-common/cpp/line-3.c b/gcc/testsuite/c-c++-common/cpp/line-3.c index b067292..93612c5 100644 --- a/gcc/testsuite/c-c++-common/cpp/line-3.c +++ b/gcc/testsuite/c-c++-common/cpp/line-3.c @@ -15,6 +15,6 @@ int line4; // { dg-regexp {In file included from <command-line>:\n[^\n]*/line-2.h:4:2: error: #error wrong\n} } -// { dg-regexp {[^\n]*/line-3.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3:9: note: macro "bill" defined here\n} } +// { dg-regexp {[^\n]*/line-3.c:3:11: error: macro 'bill' passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3:9: note: macro 'bill' defined here\n} } // { dg-options "-fpreprocessed -fdirectives-only" } diff --git a/gcc/testsuite/c-c++-common/cpp/macro-arg-count-1.c b/gcc/testsuite/c-c++-common/cpp/macro-arg-count-1.c index 103e88e..1ff075b 100644 --- a/gcc/testsuite/c-c++-common/cpp/macro-arg-count-1.c +++ b/gcc/testsuite/c-c++-common/cpp/macro-arg-count-1.c @@ -4,7 +4,7 @@ void test_1 () { MACRO_1(42); /* { dg-line "use_of_MACRO_1" } */ - /* { dg-error "macro \"MACRO_1\" requires 2 arguments, but only 1 given" "" { target *-*-* } use_of_MACRO_1 } */ + /* { dg-error "macro 'MACRO_1' requires 2 arguments, but only 1 given" "" { target *-*-* } use_of_MACRO_1 } */ /* { dg-begin-multiline-output "" } MACRO_1(42); ^ @@ -28,7 +28,7 @@ void test_1 () void test_2 () { MACRO_2(1, 2, 3); /* { dg-line "use_of_MACRO_2" } */ - /* { dg-error "macro \"MACRO_2\" passed 3 arguments, but takes just 2" "" { target *-*-* } use_of_MACRO_2 } */ + /* { dg-error "macro 'MACRO_2' passed 3 arguments, but takes just 2" "" { target *-*-* } use_of_MACRO_2 } */ /* { dg-begin-multiline-output "" } MACRO_2(1, 2, 3); ^ diff --git a/gcc/testsuite/c-c++-common/cpp/macro-arg-count-2.c b/gcc/testsuite/c-c++-common/cpp/macro-arg-count-2.c index ef64488..d636dce 100644 --- a/gcc/testsuite/c-c++-common/cpp/macro-arg-count-2.c +++ b/gcc/testsuite/c-c++-common/cpp/macro-arg-count-2.c @@ -4,8 +4,8 @@ void test_1 () { MACRO_1(42); /* { dg-line "use_of_MACRO_1" } */ - /* { dg-error "-:macro \"MACRO_1\" requires 2 arguments, but only 1 given" "" { target c } use_of_MACRO_1 } */ - /* { dg-error "macro \"MACRO_1\" requires 2 arguments, but only 1 given" "" { target c++ } use_of_MACRO_1 } */ + /* { dg-error "-:macro 'MACRO_1' requires 2 arguments, but only 1 given" "" { target c } use_of_MACRO_1 } */ + /* { dg-error "macro 'MACRO_1' requires 2 arguments, but only 1 given" "" { target c++ } use_of_MACRO_1 } */ /* { dg-message "-: macro .MACRO_1. defined here" "" { target *-*-* } def_of_MACRO_1 } */ /* { dg-error "'MACRO_1' was not declared in this scope" "" { target c++ } use_of_MACRO_1 } */ /* { dg-bogus "had not yet been defined" "" { target *-*-* } use_of_MACRO_1 } */ @@ -15,8 +15,8 @@ void test_1 () void test_2 () { MACRO_2(1, 2, 3); /* { dg-line "use_of_MACRO_2" } */ - /* { dg-error "-:macro \"MACRO_2\" passed 3 arguments, but takes just 2" "" { target c } use_of_MACRO_2 } */ - /* { dg-error "macro \"MACRO_2\" passed 3 arguments, but takes just 2" "" { target c++ } use_of_MACRO_2 } */ + /* { dg-error "-:macro 'MACRO_2' passed 3 arguments, but takes just 2" "" { target c } use_of_MACRO_2 } */ + /* { dg-error "macro 'MACRO_2' passed 3 arguments, but takes just 2" "" { target c++ } use_of_MACRO_2 } */ /* { dg-message "-: macro .MACRO_2. defined here" "" { target *-*-* } def_of_MACRO_2 } */ /* { dg-error "'MACRO_2' was not declared in this scope" "" { target c++ } use_of_MACRO_2 } */ /* { dg-bogus "had not yet been defined" "" { target *-*-* } use_of_MACRO_2 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/macro-ranges.c b/gcc/testsuite/c-c++-common/cpp/macro-ranges.c index 72b026f..72a122b 100644 --- a/gcc/testsuite/c-c++-common/cpp/macro-ranges.c +++ b/gcc/testsuite/c-c++-common/cpp/macro-ranges.c @@ -4,13 +4,13 @@ /* Verify that we output range information for diagnostics involving macro definitions. */ -#undef __TIME__ /* { dg-warning {undefining "__TIME__"} } */ +#undef __TIME__ /* { dg-warning {undefining '__TIME__'} } */ /* { dg-begin-multiline-output "" } #undef __TIME__ ^~~~~~~~ /* { dg-end-multiline-output "" } */ -#define XYZ 123 /* { dg-warning {macro "XYZ" is not used} } */ +#define XYZ 123 /* { dg-warning {macro 'XYZ' is not used} } */ /* { dg-begin-multiline-output "" } #define XYZ 123 ^~~ @@ -19,7 +19,7 @@ #define MACRO initial_definition /* { dg-line def_line } */ /* This locus is output first for the unused warning... */ -/* { dg-warning {macro "MACRO" is not used} "" { target *-*-* } def_line } */ +/* { dg-warning {macro 'MACRO' is not used} "" { target *-*-* } def_line } */ /* { dg-begin-multiline-output "" } #define MACRO initial_definition ^~~~~ @@ -32,20 +32,20 @@ ^~~~~ /* { dg-end-multiline-output "" } */ -#define MACRO /* { dg-warning {"MACRO" redefined} } */ +#define MACRO /* { dg-warning {'MACRO' redefined} } */ /* { dg-begin-multiline-output "" } #define MACRO ^~~~~ { dg-end-multiline-output "" } */ -#define MACRO2(x,y) x /* { dg-note {macro "MACRO2" defined here} } */ +#define MACRO2(x,y) x /* { dg-note {macro 'MACRO2' defined here} } */ /* { dg-begin-multiline-output "" } #define MACRO2(x,y) ^~~~~~ { dg-end-multiline-output "" } */ MACRO2(MACRO, MACRO) -MACRO2(MACRO) /* { dg-error {macro "MACRO2" requires 2 arguments, but only 1 given} } */ +MACRO2(MACRO) /* { dg-error {macro 'MACRO2' requires 2 arguments, but only 1 given} } */ /* { dg-begin-multiline-output "" } MACRO2(MACRO) ^ diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c index 75fdeff..bd72edb 100644 --- a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c +++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c @@ -9,52 +9,52 @@ typedef __CHAR32_TYPE__ char32_t; #endif const char32_t *a = U"\N{ZERO WIDTH NO BREAK SPACE}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{ZERO WIDTH NO-BREAK SPACE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{ZERO WIDTH NO-BREAK SPACE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *b = U"\N{giraffe face}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{GIRAFFE FACE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *c = U"\N{Giraffe Face}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{GIRAFFE FACE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *d = U"\N{ GiRaFfE_fAcE__ ___}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{GIRAFFE FACE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{GIRAFFE FACE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *e = U"\N{GIRAFFE}"; /* { dg-error "is not a valid universal character" } */ const char32_t *f = U"\N{Hangul_Syllable_gAgg_}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL SYLLABLE GAGG\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *g = U"\N{HANGUL SYLLABLE gagg}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL SYLLABLE GAGG\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *h = U"\N{HANGULSYLLABLEGAGG}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL SYLLABLE GAGG\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *i = U"\N{HANGUL_SYLLABLE_GAGG}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL SYLLABLE GAGG\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL SYLLABLE GAGG\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *j = U"\N{HANGUL SYLLABLE }"; /* { dg-error "is not a valid universal character" } */ const char32_t *k = U"\N{CJK-COMPATIBILITY-IDEOGRAPH-2F801}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *l = U"\N{CjK_COMPATIBILITY IDEOGRAPH 2f801}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{CJK COMPATIBILITY IDEOGRAPH-2F801\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *m = U"\N{CjK_COMPATIBILITY IDEOGRAPH 2f80}"; /* { dg-error "is not a valid universal character" } */ const char32_t *n = U"\N{CJK COMPATIBILITY IDEOGRAPH-}"; /* { dg-error "is not a valid universal character" } */ const char32_t *o = U"\N{CJK COMPATIBILITY IDEOGRAPH-X}"; /* { dg-error "is not a valid universal character" } */ const char32_t *p = U"\N{Tibetan Letter A}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{TIBETAN LETTER A\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *q = U"\N{Tibetan LetterA}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{TIBETAN LETTER A\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *r = U"\N{Tibetan Letter-A}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER A\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{TIBETAN LETTER A\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *s = U"\N{Tibetan Letter -A}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER -A\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{TIBETAN LETTER -A\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *t = U"\N{TibetanLetter -A}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{TIBETAN LETTER -A\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{TIBETAN LETTER -A\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *u = U"\N{Hangul Jungseong oe}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG OE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG OE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *v = U"\N{Hangul Jungseong o- e}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG O-E\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *w = U"\N{HangulJungseongo-e}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG O-E\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *x = U"\N{Hangul Jungseong oe __ }"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG OE\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG OE\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *y = U"\N{Hangul Jungseong o- e __ }"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG O-E\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *z = U"\N{Hangul Jungseong o -e}"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG O-E\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *A = U"\N{Hangul Jungseong o -e __ }"; /* { dg-error "is not a valid universal character" } */ - /* { dg-message "did you mean \\\\N\\{HANGUL JUNGSEONG O-E\\}\\?" "" { target *-*-* } .-1 } */ + /* { dg-message "did you mean '\\\\N\\{HANGUL JUNGSEONG O-E\\}'\\?" "" { target *-*-* } .-1 } */ const char32_t *B = U"\N{O}"; /* { dg-error "is not a valid universal character" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-5.c b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-5.c index a1c53c7..5c54731 100644 --- a/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-5.c +++ b/gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-5.c @@ -10,8 +10,8 @@ int b = a\N{}); /* { dg-warning "empty named universal character escape seque int c = a\N{); /* { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{; treating it as separate tokens" } */ int d = a\N); int e = a\NARG); -int f = a\N{abc}); /* { dg-warning "\\\\N\\\{abc\\\} is not a valid universal character; treating it as separate tokens" } */ +int f = a\N{abc}); /* { dg-warning "'\\\\N\\\{abc\\\}' is not a valid universal character; treating it as separate tokens" } */ int g = a\N{ABC.123}); /* { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{ABC; treating it as separate tokens" } */ -int h = a\N{NON-EXISTENT CHAR}); /* { dg-warning "\\\\N\\\{NON-EXISTENT CHAR\\\} is not a valid universal character; treating it as separate tokens" } */ -int i = a\N{Latin_Small_Letter_A_With_Acute}); /* { dg-warning "\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\} is not a valid universal character; treating it as separate tokens" } */ - /* { dg-message "did you mean \\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}\\?" "" { target *-*-* } .-1 } */ +int h = a\N{NON-EXISTENT CHAR}); /* { dg-warning "'\\\\N\\\{NON-EXISTENT CHAR\\\}' is not a valid universal character; treating it as separate tokens" } */ +int i = a\N{Latin_Small_Letter_A_With_Acute}); /* { dg-warning "'\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\}' is not a valid universal character; treating it as separate tokens" } */ + /* { dg-message "did you mean '\\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}'\\?" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/c-c++-common/cpp/pr88974.c b/gcc/testsuite/c-c++-common/cpp/pr88974.c index d6c2414..b7a425c 100644 --- a/gcc/testsuite/c-c++-common/cpp/pr88974.c +++ b/gcc/testsuite/c-c++-common/cpp/pr88974.c @@ -2,6 +2,6 @@ /* { dg-do preprocess } */ #if __has_include (<pr88974.h) -/* { dg-error "missing terminating > character" "" { target *-*-* } .-1 } */ -/* { dg-error "missing '\\\)' after .__has_include. operand" "" { target *-*-* } .-2 } */ +/* { dg-error "missing terminating '>' character" "" { target *-*-* } .-1 } */ +/* { dg-error "missing '\\\)' after '__has_include' operand" "" { target *-*-* } .-2 } */ #endif diff --git a/gcc/testsuite/c-c++-common/cpp/va-opt-error.c b/gcc/testsuite/c-c++-common/cpp/va-opt-error.c index f32f055..a68bb2b 100644 --- a/gcc/testsuite/c-c++-common/cpp/va-opt-error.c +++ b/gcc/testsuite/c-c++-common/cpp/va-opt-error.c @@ -2,11 +2,11 @@ /* { dg-options "-std=gnu99" { target c } } */ /* { dg-options "-std=c++2a" { target c++ } } */ -#define ERR1(x) __VA_OPT__ /* { dg-warning "__VA_OPT__ can only appear" } */ +#define ERR1(x) __VA_OPT__ /* { dg-warning "'__VA_OPT__' can only appear" } */ #define ERR2(x) __VA_OPT__( /* { dg-warning "can only appear" } */ #define ERR3(x) __VA_OPT__() /* { dg-warning "can only appear" } */ -#define ERR4(x,...) __VA_OPT__ /* { dg-error "unterminated __VA_OPT__" } */ +#define ERR4(x,...) __VA_OPT__ /* { dg-error "unterminated '__VA_OPT__'" } */ #define ERR5(x,...) __VA_OPT__( /* { dg-error "unterminated" } */ #define ERR6(x,...) __VA_OPT__(() /* { dg-error "unterminated" } */ diff --git a/gcc/testsuite/c-c++-common/cpp/va-opt-pedantic.c b/gcc/testsuite/c-c++-common/cpp/va-opt-pedantic.c index 5887bf5..4461421 100644 --- a/gcc/testsuite/c-c++-common/cpp/va-opt-pedantic.c +++ b/gcc/testsuite/c-c++-common/cpp/va-opt-pedantic.c @@ -2,4 +2,4 @@ /* { dg-options "-std=c11 -pedantic-errors" { target c } } */ /* { dg-options "-std=c++17 -pedantic-errors" { target c++ } } */ -#define CALL(F, ...) F (7 __VA_OPT__(,) __VA_ARGS__) /* { dg-error "__VA_OPT__ is not available" } */ +#define CALL(F, ...) F (7 __VA_OPT__(,) __VA_ARGS__) /* { dg-error "'__VA_OPT__' is not available" } */ diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c b/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c index 47f8923..9ac4a43 100644 --- a/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c +++ b/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c @@ -16,8 +16,8 @@ { dg-final { scan-sarif-file "\"level\": \"warning\"" } } { dg-final { scan-sarif-file "\"ruleId\": \"-Winvalid-utf8\"" } } { dg-final { scan-sarif-file "\"message\": " } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <98>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <99>"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<98>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<99>'"} } } */ diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c b/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c index ead03a5..9449948 100644 --- a/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c +++ b/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c @@ -54,42 +54,42 @@ { dg-final { scan-sarif-file "\"level\": \"warning\"" } } { dg-final { scan-sarif-file "\"ruleId\": \"-Winvalid-utf8\"" } } { dg-final { scan-sarif-file "\"message\": " } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } - { dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c0>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c1>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f5>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ff>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c2>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><80><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><9f><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ec><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ed><a0><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><80><80><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><8f><bf><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f4><90><80><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<fd><bf><bf><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c0>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c1>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f5>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ff>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c2>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><80><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><9f><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ec><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ed><a0><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><80><80><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><8f><bf><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f4><90><80><80>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<fd><bf><bf><bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } + { dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } } */ diff --git a/gcc/testsuite/c-c++-common/pr68833-3.c b/gcc/testsuite/c-c++-common/pr68833-3.c index c99a2c6..7679ecc 100644 --- a/gcc/testsuite/c-c++-common/pr68833-3.c +++ b/gcc/testsuite/c-c++-common/pr68833-3.c @@ -2,6 +2,6 @@ /* { dg-do preprocess } */ /* { dg-options "-Werror=normalized" } */ -\u0F43 // { dg-error "`.U00000f43' is not in NFC .-Werror=normalized=." } +\u0F43 // { dg-error "'.U00000f43' is not in NFC .-Werror=normalized=." } /* { dg-prune-output "treated as errors" } */ diff --git a/gcc/testsuite/c-c++-common/raw-string-directive-1.c b/gcc/testsuite/c-c++-common/raw-string-directive-1.c index d6525e1..8605a5d 100644 --- a/gcc/testsuite/c-c++-common/raw-string-directive-1.c +++ b/gcc/testsuite/c-c++-common/raw-string-directive-1.c @@ -32,19 +32,19 @@ line12 )" #if R"(line 13 /* { dg-error "line13" } */ -file:35:1: error: line14)" /* { dg-error "line14\\)\"\" is not valid" } */ -#endif R"(line 15 /* { dg-warning "extra tokens at end of #endif" } */ +file:35:1: error: line14)" +#endif R"(line 15 /* { dg-warning "extra tokens at end of '#endif'" } */ \ line16)" "" -#ifdef XYZ R"(line17 /* { dg-warning "extra tokens at end of #ifdef" } */ +#ifdef XYZ R"(line17 /* { dg-warning "extra tokens at end of '#ifdef'" } */ \ \ line18)" #endif #if 1 -#else R"(line23 /* { dg-warning "extra tokens at end of #else" } */ +#else R"(line23 /* { dg-warning "extra tokens at end of '#else'" } */ \ line24)" @@ -52,7 +52,7 @@ line24)" #if 0 #elif R"(line 25 /* { dg-error "line25" } */ -file:55:1: error: line26)" /* { dg-error "line26\\)\"\" is not valid" } */ +file:55:1: error: line26)" #endif #line 60 R"(file:60:1: warning: this file has a space @@ -61,13 +61,13 @@ in it!)" /* { dg-warning "this file has a space" "#line check" { target *-*-* } 60 } */ #line 63 "file" -#undef X1 R"(line28 /* { dg-warning "extra tokens at end of #undef" } */ +#undef X1 R"(line28 /* { dg-warning "extra tokens at end of '#undef'" } */ line29 \ )" #ident R"(line30 -line31)" R"(line 32 /* { dg-warning "extra tokens at end of #ident" } */ +line31)" R"(line 32 /* { dg-warning "extra tokens at end of '#ident'" } */ line 33)" #pragma GCC diagnostic ignored R"(-Woption /* { dg-warning "-Wpragmas" } */ diff --git a/gcc/testsuite/g++.dg/cpp/elifdef-3.C b/gcc/testsuite/g++.dg/cpp/elifdef-3.C index d9acce0..15e054c 100644 --- a/gcc/testsuite/g++.dg/cpp/elifdef-3.C +++ b/gcc/testsuite/g++.dg/cpp/elifdef-3.C @@ -4,53 +4,53 @@ #define A #undef B -#elifdef A // { dg-error "#elifdef without #if" } -#elifdef B // { dg-error "#elifdef without #if" } -#elifndef A // { dg-error "#elifndef without #if" } -#elifndef B // { dg-error "#elifndef without #if" } +#elifdef A // { dg-error "'#elifdef' without '#if'" } +#elifdef B // { dg-error "'#elifdef' without '#if'" } +#elifndef A // { dg-error "'#elifndef' without '#if'" } +#elifndef B // { dg-error "'#elifndef' without '#if'" } #if 1 // { dg-error "-:began here" } #else -#elifdef A // { dg-error "#elifdef after #else" } +#elifdef A // { dg-error "'#elifdef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifdef B // { dg-error "#elifdef after #else" } +#elifdef B // { dg-error "'#elifdef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifndef A // { dg-error "#elifndef after #else" } +#elifndef A // { dg-error "'#elifndef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifndef B // { dg-error "#elifndef after #else" } +#elifndef B // { dg-error "'#elifndef' after '#else'" } #endif #if 0 -#elifdef A = // { dg-error "extra tokens at end of #elifdef directive" } +#elifdef A = // { dg-error "extra tokens at end of '#elifdef' directive" } #endif #if 0 -#elifdef B = // { dg-error "extra tokens at end of #elifdef directive" } +#elifdef B = // { dg-error "extra tokens at end of '#elifdef' directive" } #endif #if 0 -#elifndef A = // { dg-error "extra tokens at end of #elifndef directive" } +#elifndef A = // { dg-error "extra tokens at end of '#elifndef' directive" } #endif #if 0 -#elifndef B = // { dg-error "extra tokens at end of #elifndef directive" } +#elifndef B = // { dg-error "extra tokens at end of '#elifndef' directive" } #endif #if 0 -#elifdef // { dg-error "no macro name given in #elifdef directive" } +#elifdef // { dg-error "no macro name given in '#elifdef' directive" } #endif #if 0 -#elifndef // { dg-error "no macro name given in #elifndef directive" } +#elifndef // { dg-error "no macro name given in '#elifndef' directive" } #endif #if 0 diff --git a/gcc/testsuite/g++.dg/cpp/elifdef-5.C b/gcc/testsuite/g++.dg/cpp/elifdef-5.C index f7d4007..7e772a0 100644 --- a/gcc/testsuite/g++.dg/cpp/elifdef-5.C +++ b/gcc/testsuite/g++.dg/cpp/elifdef-5.C @@ -5,53 +5,53 @@ #define A #undef B -#elifdef A // { dg-error "#elifdef without #if" } -#elifdef B // { dg-error "#elifdef without #if" } -#elifndef A // { dg-error "#elifndef without #if" } -#elifndef B // { dg-error "#elifndef without #if" } +#elifdef A // { dg-error "'#elifdef' without '#if'" } +#elifdef B // { dg-error "'#elifdef' without '#if'" } +#elifndef A // { dg-error "'#elifndef' without '#if'" } +#elifndef B // { dg-error "'#elifndef' without '#if'" } #if 1 // { dg-error "-:began here" } #else -#elifdef A // { dg-error "#elifdef after #else" } +#elifdef A // { dg-error "'#elifdef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifdef B // { dg-error "#elifdef after #else" } +#elifdef B // { dg-error "'#elifdef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifndef A // { dg-error "#elifndef after #else" } +#elifndef A // { dg-error "'#elifndef' after '#else'" } #endif #if 1 // { dg-error "-:began here" } #else -#elifndef B // { dg-error "#elifndef after #else" } +#elifndef B // { dg-error "'#elifndef' after '#else'" } #endif #if 0 -#elifdef A = // { dg-warning "extra tokens at end of #elifdef directive" } +#elifdef A = // { dg-warning "extra tokens at end of '#elifdef' directive" } #endif #if 0 -#elifdef B = // { dg-warning "extra tokens at end of #elifdef directive" } +#elifdef B = // { dg-warning "extra tokens at end of '#elifdef' directive" } #endif #if 0 -#elifndef A = // { dg-warning "extra tokens at end of #elifndef directive" } +#elifndef A = // { dg-warning "extra tokens at end of '#elifndef' directive" } #endif #if 0 -#elifndef B = // { dg-warning "extra tokens at end of #elifndef directive" } +#elifndef B = // { dg-warning "extra tokens at end of '#elifndef' directive" } #endif #if 0 -#elifdef // { dg-error "no macro name given in #elifdef directive" } +#elifdef // { dg-error "no macro name given in '#elifdef' directive" } #endif #if 0 -#elifndef // { dg-error "no macro name given in #elifndef directive" } +#elifndef // { dg-error "no macro name given in '#elifndef' directive" } #endif #if 0 diff --git a/gcc/testsuite/g++.dg/cpp/elifdef-6.C b/gcc/testsuite/g++.dg/cpp/elifdef-6.C index 94d2118..fc7b021 100644 --- a/gcc/testsuite/g++.dg/cpp/elifdef-6.C +++ b/gcc/testsuite/g++.dg/cpp/elifdef-6.C @@ -6,7 +6,7 @@ #undef B #if 0 -#elifdef A // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #define M1 1 #endif @@ -25,7 +25,7 @@ #endif #if 0 -#elifndef B // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #define M2 2 #endif @@ -34,32 +34,32 @@ #endif #if 0 -#elifdef A // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #else #error "#elifdef A did not apply" #endif #if 0 -#elifndef B // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #else #error "#elifndef B did not apply" #endif #if 1 -#elifdef A // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif #if 1 -#elifndef B // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif // As with #elif, the syntax of the new directives is relaxed after a non-skipped group. #if 1 -#elifdef x * y // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef x * y // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif #if 1 -#elifndef ! // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef ! // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif diff --git a/gcc/testsuite/g++.dg/cpp/elifdef-7.C b/gcc/testsuite/g++.dg/cpp/elifdef-7.C index bb9b8ef..413deb9 100644 --- a/gcc/testsuite/g++.dg/cpp/elifdef-7.C +++ b/gcc/testsuite/g++.dg/cpp/elifdef-7.C @@ -6,7 +6,7 @@ #undef B #if 0 -#elifdef A // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #define M1 1 #endif @@ -25,7 +25,7 @@ #endif #if 0 -#elifndef B // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #define M2 2 #endif @@ -34,32 +34,32 @@ #endif #if 0 -#elifdef A // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #else #error "#elifdef A did not apply" #endif #if 0 -#elifndef B // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #else #error "#elifndef B did not apply" #endif #if 1 -#elifdef A // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef A // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif #if 1 -#elifndef B // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef B // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif // As with #elif, the syntax of the new directives is relaxed after a non-skipped group. #if 1 -#elifdef x * y // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifdef x * y // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif #if 1 -#elifndef ! // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } +#elifndef ! // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } } #endif diff --git a/gcc/testsuite/g++.dg/cpp/embed-1.C b/gcc/testsuite/g++.dg/cpp/embed-1.C index b1427ff..e7e0b83 100644 --- a/gcc/testsuite/g++.dg/cpp/embed-1.C +++ b/gcc/testsuite/g++.dg/cpp/embed-1.C @@ -6,9 +6,9 @@ #endif int a = -#embed __FILE__ limit (1) // { dg-error "#embed is a GCC extension" } +#embed __FILE__ limit (1) // { dg-error "'#embed' is a GCC extension" } ; int b = (__extension__ -#embed __FILE__ limit (1) // { dg-error "#embed is a GCC extension" } +#embed __FILE__ limit (1) // { dg-error "'#embed' is a GCC extension" } ); diff --git a/gcc/testsuite/g++.dg/cpp/embed-2.C b/gcc/testsuite/g++.dg/cpp/embed-2.C index 45cf8b0..6c2393f 100644 --- a/gcc/testsuite/g++.dg/cpp/embed-2.C +++ b/gcc/testsuite/g++.dg/cpp/embed-2.C @@ -6,9 +6,9 @@ #endif int a = -#embed __FILE__ limit (1) // { dg-warning "#embed is a GCC extension" } +#embed __FILE__ limit (1) // { dg-warning "'#embed' is a GCC extension" } ; int b = (__extension__ -#embed __FILE__ limit (1) // { dg-warning "#embed is a GCC extension" } +#embed __FILE__ limit (1) // { dg-warning "'#embed' is a GCC extension" } ); diff --git a/gcc/testsuite/g++.dg/cpp/pedantic-errors.C b/gcc/testsuite/g++.dg/cpp/pedantic-errors.C index 0c6045a..17e75f7 100644 --- a/gcc/testsuite/g++.dg/cpp/pedantic-errors.C +++ b/gcc/testsuite/g++.dg/cpp/pedantic-errors.C @@ -2,4 +2,4 @@ /* { dg-options "-std=c++98 -pedantic-errors" } */ #if 1 -#endif 1 /* { dg-error "extra tokens at end of #endif directive" } */ +#endif 1 /* { dg-error "extra tokens at end of '#endif' directive" } */ diff --git a/gcc/testsuite/g++.dg/cpp/warning-1.C b/gcc/testsuite/g++.dg/cpp/warning-1.C index 2d857cf..604a79d 100644 --- a/gcc/testsuite/g++.dg/cpp/warning-1.C +++ b/gcc/testsuite/g++.dg/cpp/warning-1.C @@ -3,4 +3,4 @@ // { dg-options "-pedantic-errors" } #warning example text /* { dg-warning "example text" } */ -// { dg-error "#warning before C\\\+\\\+23 is a GCC extension" "pedantic" { target c++20_down } .-1 } +// { dg-error "'#warning' before C\\\+\\\+23 is a GCC extension" "pedantic" { target c++20_down } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp/warning-2.C b/gcc/testsuite/g++.dg/cpp/warning-2.C index d6d5d9f..ae15b6b 100644 --- a/gcc/testsuite/g++.dg/cpp/warning-2.C +++ b/gcc/testsuite/g++.dg/cpp/warning-2.C @@ -3,4 +3,4 @@ // { dg-options "-pedantic" } #warning example text /* { dg-warning "example text" } */ -// { dg-warning "#warning before C\\\+\\\+23 is a GCC extension" "pedantic" { target c++20_down } .-1 } +// { dg-warning "'#warning' before C\\\+\\\+23 is a GCC extension" "pedantic" { target c++20_down } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-error1.C b/gcc/testsuite/g++.dg/cpp0x/udlit-error1.C index ea939c5..77a315a 100644 --- a/gcc/testsuite/g++.dg/cpp0x/udlit-error1.C +++ b/gcc/testsuite/g++.dg/cpp0x/udlit-error1.C @@ -3,7 +3,7 @@ void operator""_x(const char *, decltype(sizeof(0))); -#include ""_x // { dg-error "include expects" } +#include ""_x // { dg-error "'#include' expects" } #line ""_x // { dg-error "not a positive integer" } #if __has_include(""_x) // { dg-error "requires a header-name" } #endif diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-1.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-1.C index 95e3827..b0ffc92 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-1.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-1.C @@ -4,40 +4,40 @@ // { dg-options "-finput-charset=UTF-8" } // aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } -// a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -// a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -// aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -// aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -// aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -// aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -// aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -// aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -// aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -// að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -// aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } -// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +// a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +// a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +// aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +// aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +// aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +// aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +// aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +// aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +// að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +// aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } +// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } /* aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } */ -/* a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } */ -/* a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } */ -/* aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } */ -/* aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } */ -/* aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } */ -/* aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } */ -/* aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } */ -/* aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } */ -/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */ -/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */ -/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */ -/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } */ -/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */ -/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */ -/* að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */ -/* aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */ -/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */ -/* { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */ +/* a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } */ +/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } */ +/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } */ +/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } */ +/* aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } */ +/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } */ +/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } */ +/* aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } */ +/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */ +/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */ +/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */ +/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */ +/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */ +/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */ +/* að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */ +/* aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } */ +/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } */ +/* { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } */ diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-10.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-10.C index 4684b9d..764de49 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-10.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-10.C @@ -6,20 +6,20 @@ #define I(x) I(Â€ß¿à €íŸ¿î€€ð€€ô¿¿) // { dg-bogus "invalid UTF-8 character" } // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 } -I(€) // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -I(¿) // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -I(À) // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -I(Á) // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -I(õ) // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -I(Â) // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -I(à) // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -I(à€¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -I(àŸ€) // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -I(ì€) // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -I(í €) // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -I(ð€€€) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -I(ð¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } +I(€) // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +I(À) // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +I(à) // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +I(à€¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +I(àŸ€) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +I(ì€) // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +I(í €) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +I(ð€€€) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +I(ð¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } I(ô€€) // { dg-error "is not valid in an identifier" } I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-11.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-11.C index 85f04bf..aabbb0f 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-11.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-11.C @@ -6,20 +6,20 @@ #define I(x) I(Â€ß¿à €íŸ¿î€€ð€€ô¿¿) // { dg-bogus "invalid UTF-8 character" } // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 } -I(€) // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -I(¿) // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -I(À) // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -I(Á) // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -I(õ) // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -I(ÿ) // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -I(Â) // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -I(à) // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -I(à€¿) // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -I(àŸ€) // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -I(à¿) // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -I(ì€) // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -I(í €) // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -I(ð€€€) // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -I(ð¿¿) // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } +I(€) // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +I(¿) // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +I(À) // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +I(Á) // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +I(õ) // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +I(ÿ) // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +I(Â) // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +I(à) // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +I(à€¿) // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +I(àŸ€) // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +I(à¿) // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +I(ì€) // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +I(í €) // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +I(ð€€€) // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +I(ð¿¿) // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } I(ô€€) // { dg-error "is not valid in an identifier" } I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-12.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-12.C index 6a4091f..a09d920 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-12.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-12.C @@ -6,20 +6,20 @@ #define I(x) I(Â€ß¿à €íŸ¿î€€ð€€ô¿¿) // { dg-bogus "invalid UTF-8 character" } // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 } -I(€) // { dg-bogus "invalid UTF-8 character <80>" } -I(¿) // { dg-bogus "invalid UTF-8 character <bf>" } -I(À) // { dg-bogus "invalid UTF-8 character <c0>" } -I(Á) // { dg-bogus "invalid UTF-8 character <c1>" } -I(õ) // { dg-bogus "invalid UTF-8 character <f5>" } -I(ÿ) // { dg-bogus "invalid UTF-8 character <ff>" } -I(Â) // { dg-bogus "invalid UTF-8 character <c2>" } -I(à) // { dg-bogus "invalid UTF-8 character <e0>" } -I(à€¿) // { dg-bogus "invalid UTF-8 character <e0><80><bf>" } -I(àŸ€) // { dg-bogus "invalid UTF-8 character <e0><9f><80>" } -I(à¿) // { dg-bogus "invalid UTF-8 character <e0><bf>" } -I(ì€) // { dg-bogus "invalid UTF-8 character <ec><80>" } -I(í €) // { dg-bogus "invalid UTF-8 character <ed><a0><80>" } -I(ð€€€) // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" } -I(ð¿¿) // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" } +I(€) // { dg-bogus "invalid UTF-8 character '<80>" } +I(¿) // { dg-bogus "invalid UTF-8 character '<bf>'" } +I(À) // { dg-bogus "invalid UTF-8 character '<c0>'" } +I(Á) // { dg-bogus "invalid UTF-8 character '<c1>'" } +I(õ) // { dg-bogus "invalid UTF-8 character '<f5>'" } +I(ÿ) // { dg-bogus "invalid UTF-8 character '<ff>'" } +I(Â) // { dg-bogus "invalid UTF-8 character '<c2>'" } +I(à) // { dg-bogus "invalid UTF-8 character '<e0>'" } +I(à€¿) // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" } +I(àŸ€) // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" } +I(à¿) // { dg-bogus "invalid UTF-8 character '<e0><bf>'" } +I(ì€) // { dg-bogus "invalid UTF-8 character '<ec><80>'" } +I(í €) // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" } +I(ð€€€) // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" } +I(ð¿¿) // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" } I(ô€€) // { dg-error "is not valid in an identifier" } I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-2.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-2.C index 70ab8e5..6436705 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-2.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-2.C @@ -4,40 +4,40 @@ // { dg-options "-finput-charset=UTF-8 -pedantic" } // aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } -// a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -// a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -// aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -// aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -// aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -// aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -// aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -// aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -// aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -// að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -// aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } -// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +// a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +// a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +// aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +// aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +// aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +// aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +// aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +// aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +// að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +// aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } +// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } /* aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } */ -/* a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } */ -/* a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } */ -/* aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } */ -/* aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } */ -/* aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } */ -/* aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } */ -/* aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } */ -/* aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } */ -/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */ -/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */ -/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */ -/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } */ -/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */ -/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */ -/* að¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */ -/* aô€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */ -/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */ -/* { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */ +/* a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } */ +/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } */ +/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } */ +/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } */ +/* aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } */ +/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } */ +/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } */ +/* aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } */ +/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */ +/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */ +/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */ +/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */ +/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */ +/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */ +/* að¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */ +/* aô€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } */ +/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } */ +/* { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } */ diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-3.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-3.C index c0f748b..3945993 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-3.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-3.C @@ -4,40 +4,40 @@ // { dg-options "-finput-charset=UTF-8 -pedantic-errors" } // aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } -// a€a { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -// a¿a { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -// aÀa { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -// aÁa { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -// aõa { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -// aÿa { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -// aÂa { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -// aàa { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -// aà€¿a { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -// aàŸ€a { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -// aà¿a { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -// aì€a { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -// aí €a { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -// að€€€a { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -// að¿¿a { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -// aô€€a { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -// aý¿¿¿¿¿a { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } -// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +// a€a { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +// a¿a { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +// aÀa { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +// aÁa { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +// aõa { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +// aÿa { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +// aÂa { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +// aàa { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +// aà€¿a { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +// aàŸ€a { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +// aà¿a { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +// aì€a { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +// aí €a { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +// að€€€a { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +// að¿¿a { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +// aô€€a { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +// aý¿¿¿¿¿a { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } +// { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } /* aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } */ -/* a€a { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } */ -/* a¿a { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } */ -/* aÀa { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } */ -/* aÁa { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } */ -/* aõa { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } */ -/* aÿa { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } */ -/* aÂa { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } */ -/* aàa { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } */ -/* aà€¿a { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */ -/* aàŸ€a { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */ -/* aà¿a { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */ -/* aì€a { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } */ -/* aí €a { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */ -/* að€€€a { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */ -/* að¿¿a { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */ -/* aô€€a { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */ -/* aý¿¿¿¿¿a { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */ -/* { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */ +/* a€a { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } */ +/* a¿a { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } */ +/* aÀa { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } */ +/* aÁa { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } */ +/* aõa { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } */ +/* aÿa { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } */ +/* aÂa { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } */ +/* aàa { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } */ +/* aà€¿a { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */ +/* aàŸ€a { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */ +/* aà¿a { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */ +/* aì€a { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */ +/* aí €a { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */ +/* að€€€a { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */ +/* að¿¿a { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */ +/* aô€€a { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } */ +/* aý¿¿¿¿¿a { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } */ +/* { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } */ diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-4.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-4.C index 1dc65e3..33a7dca 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-4.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-4.C @@ -4,40 +4,40 @@ // { dg-options "-finput-charset=UTF-8 -pedantic-errors -Wno-invalid-utf8" } // aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } -// a€a { dg-bogus "invalid UTF-8 character <80>" } -// a¿a { dg-bogus "invalid UTF-8 character <bf>" } -// aÀa { dg-bogus "invalid UTF-8 character <c0>" } -// aÁa { dg-bogus "invalid UTF-8 character <c1>" } -// aõa { dg-bogus "invalid UTF-8 character <f5>" } -// aÿa { dg-bogus "invalid UTF-8 character <ff>" } -// aÂa { dg-bogus "invalid UTF-8 character <c2>" } -// aàa { dg-bogus "invalid UTF-8 character <e0>" } -// aà€¿a { dg-bogus "invalid UTF-8 character <e0><80><bf>" } -// aàŸ€a { dg-bogus "invalid UTF-8 character <e0><9f><80>" } -// aà¿a { dg-bogus "invalid UTF-8 character <e0><bf>" } -// aì€a { dg-bogus "invalid UTF-8 character <ec><80>" } -// aí €a { dg-bogus "invalid UTF-8 character <ed><a0><80>" } -// að€€€a { dg-bogus "invalid UTF-8 character <f0><80><80><80>" } -// að¿¿a { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" } -// aô€€a { dg-bogus "invalid UTF-8 character <f4><90><80><80>" } -// aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" } -// { dg-bogus "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } +// a€a { dg-bogus "invalid UTF-8 character '<80>'" } +// a¿a { dg-bogus "invalid UTF-8 character '<bf>'" } +// aÀa { dg-bogus "invalid UTF-8 character '<c0>'" } +// aÁa { dg-bogus "invalid UTF-8 character '<c1>'" } +// aõa { dg-bogus "invalid UTF-8 character '<f5>'" } +// aÿa { dg-bogus "invalid UTF-8 character '<ff>'" } +// aÂa { dg-bogus "invalid UTF-8 character '<c2>'" } +// aàa { dg-bogus "invalid UTF-8 character '<e0>'" } +// aà€¿a { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" } +// aàŸ€a { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" } +// aà¿a { dg-bogus "invalid UTF-8 character '<e0><bf>'" } +// aì€a { dg-bogus "invalid UTF-8 character '<ec><80>'" } +// aí €a { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" } +// að€€€a { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" } +// að¿¿a { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" } +// aô€€a { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" } +// aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" } +// { dg-bogus "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } /* aÂ€ß¿à €íŸ¿î€€ð€€ô¿¿a { dg-bogus "invalid UTF-8 character" } */ -/* a€a { dg-bogus "invalid UTF-8 character <80>" } */ -/* a¿a { dg-bogus "invalid UTF-8 character <bf>" } */ -/* aÀa { dg-bogus "invalid UTF-8 character <c0>" } */ -/* aÁa { dg-bogus "invalid UTF-8 character <c1>" } */ -/* aõa { dg-bogus "invalid UTF-8 character <f5>" } */ -/* aÿa { dg-bogus "invalid UTF-8 character <ff>" } */ -/* aÂa { dg-bogus "invalid UTF-8 character <c2>" } */ -/* aàa { dg-bogus "invalid UTF-8 character <e0>" } */ -/* aà€¿a { dg-bogus "invalid UTF-8 character <e0><80><bf>" } */ -/* aàŸ€a { dg-bogus "invalid UTF-8 character <e0><9f><80>" } */ -/* aà¿a { dg-bogus "invalid UTF-8 character <e0><bf>" } */ -/* aì€a { dg-bogus "invalid UTF-8 character <ec><80>" } */ -/* aí €a { dg-bogus "invalid UTF-8 character <ed><a0><80>" } */ -/* að€€€a { dg-bogus "invalid UTF-8 character <f0><80><80><80>" } */ -/* að¿¿a { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" } */ -/* aô€€a { dg-bogus "invalid UTF-8 character <f4><90><80><80>" } */ -/* aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" } */ -/* { dg-bogus "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } */ +/* a€a { dg-bogus "invalid UTF-8 character '<80>'" } */ +/* a¿a { dg-bogus "invalid UTF-8 character '<bf>'" } */ +/* aÀa { dg-bogus "invalid UTF-8 character '<c0>'" } */ +/* aÁa { dg-bogus "invalid UTF-8 character '<c1>'" } */ +/* aõa { dg-bogus "invalid UTF-8 character '<f5>'" } */ +/* aÿa { dg-bogus "invalid UTF-8 character '<ff>'" } */ +/* aÂa { dg-bogus "invalid UTF-8 character '<c2>'" } */ +/* aàa { dg-bogus "invalid UTF-8 character '<e0>'" } */ +/* aà€¿a { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" } */ +/* aàŸ€a { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" } */ +/* aà¿a { dg-bogus "invalid UTF-8 character '<e0><bf>'" } */ +/* aì€a { dg-bogus "invalid UTF-8 character '<ec><80>'" } */ +/* aí €a { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" } */ +/* að€€€a { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" } */ +/* að¿¿a { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" } */ +/* aô€€a { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" } */ +/* aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" } */ +/* { dg-bogus "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-5.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-5.C index f0140ba..43718b8 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-5.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-5.C @@ -3,78 +3,78 @@ // { dg-do preprocess { target c++11 } } // { dg-options "-finput-charset=UTF-8" } -char32_t a = U'€'; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +char32_t a = U'€'; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A = U"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B = U"€"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q = U"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B = U"€"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q = U"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A1 = UR"(Â€ß¿à €íŸ¿î€€ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" } -auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A2 = u8"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B2 = u8"€"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B2 = u8"€"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-6.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-6.C index 01023d3..eb2bf36 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-6.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-6.C @@ -3,78 +3,78 @@ // { dg-do preprocess { target c++11 } } // { dg-options "-finput-charset=UTF-8 -pedantic" } -char32_t a = U'€'; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +char32_t a = U'€'; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +char32_t i = U'à€¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +char32_t j = U'àŸ€'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +char32_t l = U'ì€'; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +char32_t m = U'í €'; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +char32_t n = U'ð€€€'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +char32_t o = U'ð¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +char32_t p = U'ô€€'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A = U"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B = U"€"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q = U"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B = U"€"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P = U"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q = U"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A1 = UR"(Â€ß¿à €íŸ¿î€€ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" } -auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P1 = UR"(ð¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q1 = UR"(ô€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A2 = u8"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B2 = u8"€"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B2 = u8"€"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P2 = u8"ð¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q2 = u8"ô€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-7.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-7.C index 7991a64..d6a094b 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-7.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-7.C @@ -3,78 +3,78 @@ // { dg-do preprocess { target c++11 } } // { dg-options "-finput-charset=UTF-8 -pedantic-errors" } -char32_t a = U'€'; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -char32_t b = U'¿'; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -char32_t c = U'À'; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -char32_t d = U'Á'; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -char32_t e = U'õ'; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -char32_t f = U'ÿ'; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -char32_t g = U'Â'; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -char32_t h = U'à'; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -char32_t i = U'à€¿'; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -char32_t j = U'àŸ€'; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -char32_t k = U'à¿'; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -char32_t l = U'ì€'; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -char32_t m = U'í €'; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -char32_t n = U'ð€€€'; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -char32_t o = U'ð¿¿'; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -char32_t p = U'ô€€'; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -char32_t q = U'ý¿¿¿¿¿'; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +char32_t a = U'€'; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +char32_t b = U'¿'; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +char32_t c = U'À'; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +char32_t d = U'Á'; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +char32_t e = U'õ'; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +char32_t f = U'ÿ'; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +char32_t g = U'Â'; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +char32_t h = U'à'; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +char32_t i = U'à€¿'; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +char32_t j = U'àŸ€'; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +char32_t k = U'à¿'; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +char32_t l = U'ì€'; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +char32_t m = U'í €'; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +char32_t n = U'ð€€€'; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +char32_t o = U'ð¿¿'; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +char32_t p = U'ô€€'; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +char32_t q = U'ý¿¿¿¿¿'; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A = U"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B = U"€"; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -auto C = U"¿"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D = U"À"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E = U"Á"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F = U"õ"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G = U"ÿ"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H = U"Â"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I = U"à"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J = U"à€¿"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K = U"àŸ€"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L = U"à¿"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M = U"ì€"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N = U"í €"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O = U"ð€€€"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P = U"ð¿¿"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q = U"ô€€"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R = U"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B = U"€"; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C = U"¿"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D = U"À"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E = U"Á"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F = U"õ"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G = U"ÿ"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H = U"Â"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I = U"à"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J = U"à€¿"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K = U"àŸ€"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L = U"à¿"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M = U"ì€"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N = U"í €"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O = U"ð€€€"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P = U"ð¿¿"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q = U"ô€€"; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R = U"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A1 = UR"(Â€ß¿à €íŸ¿î€€ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" } -auto B1 = UR"(€)"; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -auto C1 = UR"(¿)"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D1 = UR"(À)"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E1 = UR"(Á)"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F1 = UR"(õ)"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G1 = UR"(ÿ)"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H1 = UR"(Â)"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I1 = UR"(à)"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J1 = UR"(à€¿)"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K1 = UR"(àŸ€)"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L1 = UR"(à¿)"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M1 = UR"(ì€)"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N1 = UR"(í €)"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O1 = UR"(ð€€€)"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P1 = UR"(ð¿¿)"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q1 = UR"(ô€€)"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B1 = UR"(€)"; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C1 = UR"(¿)"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D1 = UR"(À)"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E1 = UR"(Á)"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F1 = UR"(õ)"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G1 = UR"(ÿ)"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H1 = UR"(Â)"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I1 = UR"(à)"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J1 = UR"(à€¿)"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K1 = UR"(àŸ€)"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L1 = UR"(à¿)"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M1 = UR"(ì€)"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N1 = UR"(í €)"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O1 = UR"(ð€€€)"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P1 = UR"(ð¿¿)"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q1 = UR"(ô€€)"; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A2 = u8"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B2 = u8"€"; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } -auto C2 = u8"¿"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D2 = u8"À"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E2 = u8"Á"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F2 = u8"õ"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G2 = u8"ÿ"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H2 = u8"Â"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I2 = u8"à"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J2 = u8"à€¿"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K2 = u8"àŸ€"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L2 = u8"à¿"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M2 = u8"ì€"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N2 = u8"í €"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O2 = u8"ð€€€"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P2 = u8"ð¿¿"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q2 = u8"ô€€"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R2 = u8"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B2 = u8"€"; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C2 = u8"¿"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D2 = u8"À"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E2 = u8"Á"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F2 = u8"õ"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G2 = u8"ÿ"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H2 = u8"Â"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I2 = u8"à"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J2 = u8"à€¿"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K2 = u8"àŸ€"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L2 = u8"à¿"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M2 = u8"ì€"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N2 = u8"í €"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O2 = u8"ð€€€"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P2 = u8"ð¿¿"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q2 = u8"ô€€"; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R2 = u8"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-8.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-8.C index 95c8a91..d2f9452 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-8.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-8.C @@ -3,78 +3,78 @@ // { dg-do preprocess { target c++11 } } // { dg-options "-finput-charset=UTF-8 -pedantic-errors -Wno-invalid-utf8" } -char32_t a = U'€'; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } } -char32_t b = U'¿'; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } } -char32_t c = U'À'; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } } -char32_t d = U'Á'; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } } -char32_t e = U'õ'; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } } -char32_t f = U'ÿ'; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } } -char32_t g = U'Â'; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } } -char32_t h = U'à'; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } } -char32_t i = U'à€¿'; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -char32_t j = U'àŸ€'; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -char32_t k = U'à¿'; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -char32_t l = U'ì€'; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } } -char32_t m = U'í €'; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -char32_t n = U'ð€€€'; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -char32_t o = U'ð¿¿'; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -char32_t p = U'ô€€'; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -char32_t q = U'ý¿¿¿¿¿'; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +char32_t a = U'€'; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } } +char32_t b = U'¿'; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } } +char32_t c = U'À'; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } } +char32_t d = U'Á'; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } } +char32_t e = U'õ'; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } } +char32_t f = U'ÿ'; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } } +char32_t g = U'Â'; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } } +char32_t h = U'à'; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } } +char32_t i = U'à€¿'; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +char32_t j = U'àŸ€'; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +char32_t k = U'à¿'; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +char32_t l = U'ì€'; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +char32_t m = U'í €'; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +char32_t n = U'ð€€€'; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +char32_t o = U'ð¿¿'; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +char32_t p = U'ô€€'; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +char32_t q = U'ý¿¿¿¿¿'; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A = U"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B = U"€"; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } } -auto C = U"¿"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D = U"À"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E = U"Á"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F = U"õ"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G = U"ÿ"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H = U"Â"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I = U"à"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J = U"à€¿"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K = U"àŸ€"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L = U"à¿"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M = U"ì€"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N = U"í €"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O = U"ð€€€"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P = U"ð¿¿"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q = U"ô€€"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R = U"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B = U"€"; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C = U"¿"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D = U"À"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E = U"Á"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F = U"õ"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G = U"ÿ"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H = U"Â"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I = U"à"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J = U"à€¿"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K = U"àŸ€"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L = U"à¿"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M = U"ì€"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N = U"í €"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O = U"ð€€€"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P = U"ð¿¿"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q = U"ô€€"; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R = U"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A1 = UR"(Â€ß¿à €íŸ¿î€€ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" } -auto B1 = UR"(€)"; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } } -auto C1 = UR"(¿)"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D1 = UR"(À)"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E1 = UR"(Á)"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F1 = UR"(õ)"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G1 = UR"(ÿ)"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H1 = UR"(Â)"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I1 = UR"(à)"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J1 = UR"(à€¿)"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K1 = UR"(àŸ€)"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L1 = UR"(à¿)"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M1 = UR"(ì€)"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N1 = UR"(í €)"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O1 = UR"(ð€€€)"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P1 = UR"(ð¿¿)"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q1 = UR"(ô€€)"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B1 = UR"(€)"; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C1 = UR"(¿)"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D1 = UR"(À)"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E1 = UR"(Á)"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F1 = UR"(õ)"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G1 = UR"(ÿ)"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H1 = UR"(Â)"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I1 = UR"(à)"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J1 = UR"(à€¿)"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K1 = UR"(àŸ€)"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L1 = UR"(à¿)"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M1 = UR"(ì€)"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N1 = UR"(í €)"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O1 = UR"(ð€€€)"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P1 = UR"(ð¿¿)"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q1 = UR"(ô€€)"; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } auto A2 = u8"Â€ß¿à €íŸ¿î€€ð€€ô¿¿"; // { dg-bogus "invalid UTF-8 character" } -auto B2 = u8"€"; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } } -auto C2 = u8"¿"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } } -auto D2 = u8"À"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } } -auto E2 = u8"Á"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } } -auto F2 = u8"õ"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } } -auto G2 = u8"ÿ"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } } -auto H2 = u8"Â"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } } -auto I2 = u8"à"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } } -auto J2 = u8"à€¿"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -auto K2 = u8"àŸ€"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -auto L2 = u8"à¿"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -auto M2 = u8"ì€"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } } -auto N2 = u8"í €"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -auto O2 = u8"ð€€€"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -auto P2 = u8"ð¿¿"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } -auto Q2 = u8"ô€€"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } -auto R2 = u8"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } - // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } +auto B2 = u8"€"; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } } +auto C2 = u8"¿"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } } +auto D2 = u8"À"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } } +auto E2 = u8"Á"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } } +auto F2 = u8"õ"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } } +auto G2 = u8"ÿ"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } } +auto H2 = u8"Â"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } } +auto I2 = u8"à"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } } +auto J2 = u8"à€¿"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +auto K2 = u8"àŸ€"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +auto L2 = u8"à¿"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +auto M2 = u8"ì€"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +auto N2 = u8"í €"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +auto O2 = u8"ð€€€"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +auto P2 = u8"ð¿¿"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } +auto Q2 = u8"ô€€"; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } } +auto R2 = u8"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } } + // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-9.C b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-9.C index 0afc945..7cda0c4 100644 --- a/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-9.C +++ b/gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-9.C @@ -6,20 +6,20 @@ #define I(x) I(Â€ß¿à €íŸ¿î€€ð€€ô¿¿) // { dg-bogus "invalid UTF-8 character" } // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 } -I(€) // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } -I(¿) // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } -I(À) // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } -I(Á) // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } -I(õ) // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } -I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } -I(Â) // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } -I(à) // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } -I(à€¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } -I(àŸ€) // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } -I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } -I(ì€) // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } -I(í €) // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } -I(ð€€€) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } -I(ð¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } +I(€) // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } +I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } +I(À) // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } +I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } +I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } +I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } +I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } +I(à) // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } +I(à€¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } +I(àŸ€) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } +I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } +I(ì€) // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } +I(í €) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } +I(ð€€€) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } +I(ð¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } I(ô€€) // { dg-error "is not valid in an identifier" } I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" } diff --git a/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape1.C b/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape1.C index fe49482..9cdc000 100644 --- a/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape1.C +++ b/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape1.C @@ -8,9 +8,9 @@ int b = a\N{}); // { dg-warning "empty named universal character escape seque int c = a\N{); // { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{; treating it as separate tokens" "" { target c++23 } } int d = a\N); int e = a\NARG); -int f = a\N{abc}); // { dg-warning "\\\\N\\\{abc\\\} is not a valid universal character; treating it as separate tokens" "" { target c++23 } } +int f = a\N{abc}); // { dg-warning "'\\\\N\\\{abc\\\}' is not a valid universal character; treating it as separate tokens" "" { target c++23 } } int g = a\N{ABC.123}); // { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{ABC; treating it as separate tokens" "" { target c++23 } } int h = a\N{NON-EXISTENT CHAR}); // { dg-error "is not a valid universal character" "" { target c++23 } } // { dg-error "was not declared in this scope" "" { target c++23 } .-1 } -int i = a\N{Latin_Small_Letter_A_With_Acute}); // { dg-warning "\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\} is not a valid universal character; treating it as separate tokens" "" { target c++23 } } - // { dg-message "did you mean \\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}\\?" "" { target c++23 } .-1 } +int i = a\N{Latin_Small_Letter_A_With_Acute}); // { dg-warning "'\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\}' is not a valid universal character; treating it as separate tokens" "" { target c++23 } } + // { dg-message "did you mean '\\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}'\\?" "" { target c++23 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape2.C b/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape2.C index 8699e09..4aa6ed0 100644 --- a/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape2.C +++ b/gcc/testsuite/g++.dg/cpp23/named-universal-char-escape2.C @@ -9,10 +9,10 @@ int b = a\N{}); // { dg-warning "empty named universal character escape seque int c = a\N{); // { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{; treating it as separate tokens" } int d = a\N); int e = a\NARG); -int f = a\N{abc}); // { dg-warning "\\\\N\\\{abc\\\} is not a valid universal character; treating it as separate tokens" } +int f = a\N{abc}); // { dg-warning "'\\\\N\\\{abc\\\}' is not a valid universal character; treating it as separate tokens" } int g = a\N{ABC.123}); // { dg-warning "'\\\\N\\\{' not terminated with '\\\}' after \\\\N\\\{ABC; treating it as separate tokens" } int h = a\N{NON-EXISTENT CHAR}); // { dg-error "is not a valid universal character" "" { target c++23 } } // { dg-error "was not declared in this scope" "" { target c++23 } .-1 } - // { dg-warning "\\\\N\\\{NON-EXISTENT CHAR\\\} is not a valid universal character; treating it as separate tokens" "" { target c++20_down } .-2 } -int i = a\N{Latin_Small_Letter_A_With_Acute}); // { dg-warning "\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\} is not a valid universal character; treating it as separate tokens" } - // { dg-message "did you mean \\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}\\?" "" { target *-*-* } .-1 } + // { dg-warning "'\\\\N\\\{NON-EXISTENT CHAR\\\}' is not a valid universal character; treating it as separate tokens" "" { target c++20_down } .-2 } +int i = a\N{Latin_Small_Letter_A_With_Acute}); // { dg-warning "'\\\\N\\\{Latin_Small_Letter_A_With_Acute\\\}' is not a valid universal character; treating it as separate tokens" } + // { dg-message "did you mean '\\\\N\\\{LATIN SMALL LETTER A WITH ACUTE\\\}'\\?" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/g++.dg/ext/bitint1.C b/gcc/testsuite/g++.dg/ext/bitint1.C index 3d9afdc..8a95bc22 100644 --- a/gcc/testsuite/g++.dg/ext/bitint1.C +++ b/gcc/testsuite/g++.dg/ext/bitint1.C @@ -3,7 +3,7 @@ _BitInt(63) a; // { dg-error "expected" } unsigned _BitInt(31) b; // { dg-error "expected" } -int c = 21wb; // { dg-error "invalid suffix \"wb\" on integer constant" "" { target c++98_only } } +int c = 21wb; // { dg-error "invalid suffix 'wb' on integer constant" "" { target c++98_only } } // { dg-error "unable to find numeric literal operator 'operator\"\"wb'" "" { target c++11 } .-1 } -long long d = 60594869054uwb; // { dg-error "invalid suffix \"uwb\" on integer constant" "" { target c++98_only } } +long long d = 60594869054uwb; // { dg-error "invalid suffix 'uwb' on integer constant" "" { target c++98_only } } // { dg-error "unable to find numeric literal operator 'operator\"\"uwb'" "" { target c++11 } .-1 } diff --git a/gcc/testsuite/g++.dg/ext/bitint2.C b/gcc/testsuite/g++.dg/ext/bitint2.C index ae8b9cb..18fbe3d 100644 --- a/gcc/testsuite/g++.dg/ext/bitint2.C +++ b/gcc/testsuite/g++.dg/ext/bitint2.C @@ -4,7 +4,7 @@ _BitInt(63) a; // { dg-error "expected" } unsigned _BitInt(31) b; // { dg-error "expected" } -int c = 21wb; // { dg-error "invalid suffix \"wb\" on integer constant" "" { target c++98_only } } +int c = 21wb; // { dg-error "invalid suffix 'wb' on integer constant" "" { target c++98_only } } // { dg-error "unable to find numeric literal operator 'operator\"\"wb'" "" { target c++11 } .-1 } -long long d = 60594869054uwb; // { dg-error "invalid suffix \"uwb\" on integer constant" "" { target c++98_only } } +long long d = 60594869054uwb; // { dg-error "invalid suffix 'uwb' on integer constant" "" { target c++98_only } } // { dg-error "unable to find numeric literal operator 'operator\"\"uwb'" "" { target c++11 } .-1 } diff --git a/gcc/testsuite/gcc.dg/analyzer/named-constants-Wunused-macros.c b/gcc/testsuite/gcc.dg/analyzer/named-constants-Wunused-macros.c index 0b31cc4..4a03f9e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/named-constants-Wunused-macros.c +++ b/gcc/testsuite/gcc.dg/analyzer/named-constants-Wunused-macros.c @@ -7,9 +7,9 @@ /* Various constants used by the fd state machine. */ -#define O_ACCMODE 42 /* { dg-warning "-: macro \"O_ACCMODE\" is not used" } */ -#define O_RDONLY 0x1 /* { dg-warning "-: macro \"O_RDONLY\" is not used" } */ -#define O_WRONLY 010 /* { dg-warning "-: macro \"O_WRONLY\" is not used" } */ +#define O_ACCMODE 42 /* { dg-warning "-: macro 'O_ACCMODE' is not used" } */ +#define O_RDONLY 0x1 /* { dg-warning "-: macro 'O_RDONLY' is not used" } */ +#define O_WRONLY 010 /* { dg-warning "-: macro 'O_WRONLY' is not used" } */ void test_sm_fd_constants (void) { diff --git a/gcc/testsuite/gcc.dg/binary-constants-4.c b/gcc/testsuite/gcc.dg/binary-constants-4.c index 32c9d65..cc8e63a 100644 --- a/gcc/testsuite/gcc.dg/binary-constants-4.c +++ b/gcc/testsuite/gcc.dg/binary-constants-4.c @@ -11,8 +11,8 @@ foo(void) int i; d = 0b1101; - d = 0b1101p1; /* { dg-error "invalid suffix \"p1\" on integer constant" } */ + d = 0b1101p1; /* { dg-error "invalid suffix 'p1' on integer constant" } */ d = 0x1101p1; - i = 0b3011; /* { dg-error "invalid suffix \"b3011\" on integer constant" } */ - i = 0b113; /* { dg-error "invalid digit \"3\" in binary constant" } */ + i = 0b3011; /* { dg-error "invalid suffix 'b3011' on integer constant" } */ + i = 0b113; /* { dg-error "invalid digit '3' in binary constant" } */ } diff --git a/gcc/testsuite/gcc.dg/builtin-redefine.c b/gcc/testsuite/gcc.dg/builtin-redefine.c index 8090015..9a83053 100644 --- a/gcc/testsuite/gcc.dg/builtin-redefine.c +++ b/gcc/testsuite/gcc.dg/builtin-redefine.c @@ -27,7 +27,7 @@ #define __TIME__ "X" /* Define while undefined. */ #define __TIME__ "X" /* Re-define while defined. */ /* { dg-line time_prev } */ -#define __TIME__ "Y" /* { dg-warning "\"__TIME__\" redefined" } */ +#define __TIME__ "Y" /* { dg-warning "'__TIME__' redefined" } */ /* { dg-message "previous definition" "" { target *-*-* } time_prev } */ #undef __TIME__ /* Undefine while defined. */ @@ -38,7 +38,7 @@ #define __DATE__ "X" /* Define while undefined. */ #define __DATE__ "X" /* Re-define while defined. */ /* { dg-line date_prev } */ -#define __DATE__ "Y" /* { dg-warning "\"__DATE__\" redefined" } */ +#define __DATE__ "Y" /* { dg-warning "'__DATE__' redefined" } */ /* { dg-message "previous definition" "" { target *-*-* } date_prev } */ #undef __DATE__ /* Undefine while defined. */ @@ -47,7 +47,7 @@ #define __TIMESTAMP__ "X" /* Define while already defined. */ #define __TIMESTAMP__ "X" /* Re-define while defined. */ /* { dg-line timestamp_prev } */ -#define __TIMESTAMP__ "Y" /* { dg-warning "\"__TIMESTAMP__\" redefined" } */ +#define __TIMESTAMP__ "Y" /* { dg-warning "'__TIMESTAMP__' redefined" } */ /* { dg-message "previous definition" "" { target *-*-* } timestamp_prev } */ #undef __TIMESTAMP__ /* Undefine while defined. */ @@ -71,9 +71,9 @@ /* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } .-1 } */ #endif -#define __LINE__ 0 /* { dg-warning "\"__LINE__\" redef" } */ -#define __INCLUDE_LEVEL__ 0 /* { dg-warning "\"__INCLUDE_LEVEL__\" redef" } */ -#define __COUNTER__ 0 /* { dg-warning "\"__COUNTER__\" redef" } */ +#define __LINE__ 0 /* { dg-warning "'__LINE__' redef" } */ +#define __INCLUDE_LEVEL__ 0 /* { dg-warning "'__INCLUDE_LEVEL__' redef" } */ +#define __COUNTER__ 0 /* { dg-warning "'__COUNTER__' redef" } */ int unused; /* Silence `ISO C forbids an empty translation unit' warning. */ diff --git a/gcc/testsuite/gcc.dg/cpp/19951025-1.c b/gcc/testsuite/gcc.dg/cpp/19951025-1.c index 4266500..c94114c 100644 --- a/gcc/testsuite/gcc.dg/cpp/19951025-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19951025-1.c @@ -1,4 +1,4 @@ /* { dg-do preprocess } */ -/* { dg-error "include expects" "include" { target *-*-* } .+2 } */ +/* { dg-error "'#include' expects" "include" { target *-*-* } .+2 } */ /* { dg-error "newline at end" "newline" { target *-*-* } .+1 } */ #include /\ diff --git a/gcc/testsuite/gcc.dg/cpp/c11-warning-1.c b/gcc/testsuite/gcc.dg/cpp/c11-warning-1.c index 7a2598e..b99012b 100644 --- a/gcc/testsuite/gcc.dg/cpp/c11-warning-1.c +++ b/gcc/testsuite/gcc.dg/cpp/c11-warning-1.c @@ -3,4 +3,4 @@ /* { dg-options "-std=c11 -pedantic-errors" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-error "#warning before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ +/* { dg-error "'#warning' before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/c11-warning-2.c b/gcc/testsuite/gcc.dg/cpp/c11-warning-2.c index 6b15035..33d72bb 100644 --- a/gcc/testsuite/gcc.dg/cpp/c11-warning-2.c +++ b/gcc/testsuite/gcc.dg/cpp/c11-warning-2.c @@ -3,4 +3,4 @@ /* { dg-options "-std=c11 -pedantic" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/c11-warning-3.c b/gcc/testsuite/gcc.dg/cpp/c11-warning-3.c index 124d168..44da0f7 100644 --- a/gcc/testsuite/gcc.dg/cpp/c11-warning-3.c +++ b/gcc/testsuite/gcc.dg/cpp/c11-warning-3.c @@ -3,4 +3,4 @@ /* { dg-options "-std=c11 -Wc11-c23-compat" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/c23-elifdef-2.c b/gcc/testsuite/gcc.dg/cpp/c23-elifdef-2.c index 35eb4aa..f254e67 100644 --- a/gcc/testsuite/gcc.dg/cpp/c23-elifdef-2.c +++ b/gcc/testsuite/gcc.dg/cpp/c23-elifdef-2.c @@ -5,53 +5,53 @@ #define A #undef B -#elifdef A /* { dg-error "#elifdef without #if" } */ -#elifdef B /* { dg-error "#elifdef without #if" } */ -#elifndef A /* { dg-error "#elifndef without #if" } */ -#elifndef B /* { dg-error "#elifndef without #if" } */ +#elifdef A /* { dg-error "'#elifdef' without '#if'" } */ +#elifdef B /* { dg-error "'#elifdef' without '#if'" } */ +#elifndef A /* { dg-error "'#elifndef' without '#if'" } */ +#elifndef B /* { dg-error "'#elifndef' without '#if'" } */ #if 1 /* { dg-error "-:began here" } */ #else -#elifdef A /* { dg-error "#elifdef after #else" } */ +#elifdef A /* { dg-error "'#elifdef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifdef B /* { dg-error "#elifdef after #else" } */ +#elifdef B /* { dg-error "'#elifdef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifndef A /* { dg-error "#elifndef after #else" } */ +#elifndef A /* { dg-error "'#elifndef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifndef B /* { dg-error "#elifndef after #else" } */ +#elifndef B /* { dg-error "'#elifndef' after '#else'" } */ #endif #if 0 -#elifdef A = /* { dg-error "extra tokens at end of #elifdef directive" } */ +#elifdef A = /* { dg-error "extra tokens at end of '#elifdef' directive" } */ #endif #if 0 -#elifdef B = /* { dg-error "extra tokens at end of #elifdef directive" } */ +#elifdef B = /* { dg-error "extra tokens at end of '#elifdef' directive" } */ #endif #if 0 -#elifndef A = /* { dg-error "extra tokens at end of #elifndef directive" } */ +#elifndef A = /* { dg-error "extra tokens at end of '#elifndef' directive" } */ #endif #if 0 -#elifndef B = /* { dg-error "extra tokens at end of #elifndef directive" } */ +#elifndef B = /* { dg-error "extra tokens at end of '#elifndef' directive" } */ #endif #if 0 -#elifdef /* { dg-error "no macro name given in #elifdef directive" } */ +#elifdef /* { dg-error "no macro name given in '#elifdef' directive" } */ #endif #if 0 -#elifndef /* { dg-error "no macro name given in #elifndef directive" } */ +#elifndef /* { dg-error "no macro name given in '#elifndef' directive" } */ #endif #if 0 diff --git a/gcc/testsuite/gcc.dg/cpp/c23-warning-2.c b/gcc/testsuite/gcc.dg/cpp/c23-warning-2.c index bfa52b4..880e8ab 100644 --- a/gcc/testsuite/gcc.dg/cpp/c23-warning-2.c +++ b/gcc/testsuite/gcc.dg/cpp/c23-warning-2.c @@ -3,4 +3,4 @@ /* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/embed-2.c b/gcc/testsuite/gcc.dg/cpp/embed-2.c index f6c2323..916c110 100644 --- a/gcc/testsuite/gcc.dg/cpp/embed-2.c +++ b/gcc/testsuite/gcc.dg/cpp/embed-2.c @@ -6,7 +6,7 @@ #endif int a = -#embed __FILE__ limit (1) /* { dg-error "#embed before C23 is a GCC extension" } */ +#embed __FILE__ limit (1) /* { dg-error "'#embed' before C23 is a GCC extension" } */ ; int b = (__extension__ diff --git a/gcc/testsuite/gcc.dg/cpp/embed-3.c b/gcc/testsuite/gcc.dg/cpp/embed-3.c index 0277940..8c2f786 100644 --- a/gcc/testsuite/gcc.dg/cpp/embed-3.c +++ b/gcc/testsuite/gcc.dg/cpp/embed-3.c @@ -6,7 +6,7 @@ #endif int a = -#embed __FILE__ limit (1) /* { dg-warning "#embed before C23 is a GCC extension" } */ +#embed __FILE__ limit (1) /* { dg-warning "'#embed' before C23 is a GCC extension" } */ ; int b = (__extension__ diff --git a/gcc/testsuite/gcc.dg/cpp/embed-4.c b/gcc/testsuite/gcc.dg/cpp/embed-4.c index 2e8ce6c..08323302 100644 --- a/gcc/testsuite/gcc.dg/cpp/embed-4.c +++ b/gcc/testsuite/gcc.dg/cpp/embed-4.c @@ -4,10 +4,10 @@ #if __has_embed(__FILE__ limit(6)) #endif /* { dg-error "-:'__has_embed' not supported in traditional C" "" { target *-*-* } .-2 } */ -/* { dg-error "-:missing binary operator before token \\\"\\\(\\\"" "" { target *-*-* } .-3 } */ +/* { dg-error "-:missing binary operator before token '\\\('" "" { target *-*-* } .-3 } */ #define FOO 20000,20001,20002 #define BAR 30000,30001,30002 #embed __FILE__ limit (4) prefix(10000,10001,10002+) suffix(+10003,10004,10005) -/* { dg-error "-:#embed not supported in traditional C" "" { target *-*-* } .-1 } */ +/* { dg-error "-:'#embed' not supported in traditional C" "" { target *-*-* } .-1 } */ #embed __FILE__ limit (6) prefix(FOO,) suffix(,BAR) -/* { dg-error "-:#embed not supported in traditional C" "" { target *-*-* } .-1 } */ +/* { dg-error "-:'#embed' not supported in traditional C" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/expr.c b/gcc/testsuite/gcc.dg/cpp/expr.c index 055e17a..d08cb0c 100644 --- a/gcc/testsuite/gcc.dg/cpp/expr.c +++ b/gcc/testsuite/gcc.dg/cpp/expr.c @@ -9,27 +9,27 @@ /* Neil Booth, 19 Jul 2002. */ -#if (1 ? -2: 0 + 1U) < 0 /* { dg-warning {the left operand of ":" changes sign} } */ +#if (1 ? -2: 0 + 1U) < 0 /* { dg-warning {the left operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif -#if (0 ? 0 + 1U: -2) < 0 /* { dg-warning {the right operand of ":" changes sign} } */ +#if (0 ? 0 + 1U: -2) < 0 /* { dg-warning {the right operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif /* PR preprocessor/112701 */ -#if (0 ? 0/0u : -1) < 0 /* { dg-warning {the right operand of ":" changes sign} } */ +#if (0 ? 0/0u : -1) < 0 /* { dg-warning {the right operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif -#if (0 ? 0u/0 : -1) < 0 /* { dg-warning {the right operand of ":" changes sign} } */ +#if (0 ? 0u/0 : -1) < 0 /* { dg-warning {the right operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif -#if (1 ? -1 : 0/0u) < 0 /* { dg-warning {the left operand of ":" changes sign} } */ +#if (1 ? -1 : 0/0u) < 0 /* { dg-warning {the left operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif -#if (1 ? -1 : 0u/0) < 0 /* { dg-warning {the left operand of ":" changes sign} } */ +#if (1 ? -1 : 0u/0) < 0 /* { dg-warning {the left operand of ':' changes sign} } */ #error /* { dg-bogus "error" } */ #endif diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-2.c b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-2.c index e5bd705..5bb67ac 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-2.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-2.c @@ -5,53 +5,53 @@ #define A #undef B -#elifdef A /* { dg-error "#elifdef without #if" } */ -#elifdef B /* { dg-error "#elifdef without #if" } */ -#elifndef A /* { dg-error "#elifndef without #if" } */ -#elifndef B /* { dg-error "#elifndef without #if" } */ +#elifdef A /* { dg-error "'#elifdef' without '#if'" } */ +#elifdef B /* { dg-error "'#elifdef' without '#if'" } */ +#elifndef A /* { dg-error "'#elifndef' without '#if'" } */ +#elifndef B /* { dg-error "'#elifndef' without '#if'" } */ #if 1 /* { dg-error "-:began here" } */ #else -#elifdef A /* { dg-error "#elifdef after #else" } */ +#elifdef A /* { dg-error "'#elifdef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifdef B /* { dg-error "#elifdef after #else" } */ +#elifdef B /* { dg-error "'#elifdef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifndef A /* { dg-error "#elifndef after #else" } */ +#elifndef A /* { dg-error "'#elifndef' after '#else'" } */ #endif #if 1 /* { dg-error "-:began here" } */ #else -#elifndef B /* { dg-error "#elifndef after #else" } */ +#elifndef B /* { dg-error "'#elifndef' after '#else'" } */ #endif #if 0 -#elifdef A = /* { dg-warning "extra tokens at end of #elifdef directive" } */ +#elifdef A = /* { dg-warning "extra tokens at end of '#elifdef' directive" } */ #endif #if 0 -#elifdef B = /* { dg-warning "extra tokens at end of #elifdef directive" } */ +#elifdef B = /* { dg-warning "extra tokens at end of '#elifdef' directive" } */ #endif #if 0 -#elifndef A = /* { dg-warning "extra tokens at end of #elifndef directive" } */ +#elifndef A = /* { dg-warning "extra tokens at end of '#elifndef' directive" } */ #endif #if 0 -#elifndef B = /* { dg-warning "extra tokens at end of #elifndef directive" } */ +#elifndef B = /* { dg-warning "extra tokens at end of '#elifndef' directive" } */ #endif #if 0 -#elifdef /* { dg-error "no macro name given in #elifdef directive" } */ +#elifdef /* { dg-error "no macro name given in '#elifdef' directive" } */ #endif #if 0 -#elifndef /* { dg-error "no macro name given in #elifndef directive" } */ +#elifndef /* { dg-error "no macro name given in '#elifndef' directive" } */ #endif #if 0 diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-3.c b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-3.c index 175eb16..515c9a2 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-3.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-3.c @@ -6,7 +6,7 @@ #undef B #if 0 -#elifdef A /* { dg-warning "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */ #define M1 1 #endif @@ -25,7 +25,7 @@ #endif #if 0 -#elifndef B /* { dg-warning "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */ #define M2 2 #endif @@ -34,32 +34,32 @@ #endif #if 0 -#elifdef A /* { dg-warning "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */ #else #error "#elifdef A did not apply" #endif #if 0 -#elifndef B /* { dg-warning "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */ #else #error "#elifndef B did not apply" #endif #if 1 -#elifdef A /* { dg-warning "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */ #endif #if 1 -#elifndef B /* { dg-warning "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */ #endif /* As with #elif, the syntax of the new directives is relaxed after a non-skipped group. */ #if 1 -#elifdef x * y /* { dg-warning "#elifdef before C23 is a GCC extension" } */ +#elifdef x * y /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */ #endif #if 1 -#elifndef ! /* { dg-warning "#elifndef before C23 is a GCC extension" } */ +#elifndef ! /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */ #endif diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-4.c b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-4.c index 0d40998..c7d175c 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-4.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-4.c @@ -6,7 +6,7 @@ #undef B #if 0 -#elifdef A /* { dg-error "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-error "'#elifdef' before C23 is a GCC extension" } */ #define M1 1 #endif @@ -25,7 +25,7 @@ #endif #if 0 -#elifndef B /* { dg-error "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-error "'#elifndef' before C23 is a GCC extension" } */ #define M2 2 #endif @@ -34,32 +34,32 @@ #endif #if 0 -#elifdef A /* { dg-error "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-error "'#elifdef' before C23 is a GCC extension" } */ #else #error "#elifdef A did not apply" #endif #if 0 -#elifndef B /* { dg-error "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-error "'#elifndef' before C23 is a GCC extension" } */ #else #error "#elifndef B did not apply" #endif #if 1 -#elifdef A /* { dg-error "#elifdef before C23 is a GCC extension" } */ +#elifdef A /* { dg-error "'#elifdef' before C23 is a GCC extension" } */ #endif #if 1 -#elifndef B /* { dg-error "#elifndef before C23 is a GCC extension" } */ +#elifndef B /* { dg-error "'#elifndef' before C23 is a GCC extension" } */ #endif /* As with #elif, the syntax of the new directives is relaxed after a non-skipped group. */ #if 1 -#elifdef x * y /* { dg-error "#elifdef before C23 is a GCC extension" } */ +#elifdef x * y /* { dg-error "'#elifdef' before C23 is a GCC extension" } */ #endif #if 1 -#elifndef ! /* { dg-error "#elifndef before C23 is a GCC extension" } */ +#elifndef ! /* { dg-error "'#elifndef' before C23 is a GCC extension" } */ #endif diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-1.c b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-1.c index 4a58cb9..1d6ebbd 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-1.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-1.c @@ -3,4 +3,4 @@ /* { dg-options "-std=gnu11 -pedantic-errors" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-error "#warning before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ +/* { dg-error "'#warning' before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-2.c b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-2.c index 659e867..16210a0 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-2.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-2.c @@ -3,4 +3,4 @@ /* { dg-options "-std=gnu11 -pedantic" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "pedantic" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-3.c b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-3.c index 6c7084c..4cbcb32 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu11-warning-3.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu11-warning-3.c @@ -3,4 +3,4 @@ /* { dg-options "-std=gnu11 -Wc11-c23-compat" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/gnu23-warning-2.c b/gcc/testsuite/gcc.dg/cpp/gnu23-warning-2.c index c5c4b3d..fefd7d3 100644 --- a/gcc/testsuite/gcc.dg/cpp/gnu23-warning-2.c +++ b/gcc/testsuite/gcc.dg/cpp/gnu23-warning-2.c @@ -3,4 +3,4 @@ /* { dg-options "-std=gnu23 -pedantic-errors -Wc11-c23-compat" } */ #warning example text /* { dg-warning "example text" } */ -/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ +/* { dg-warning "'#warning' before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/include6.c b/gcc/testsuite/gcc.dg/cpp/include6.c index c76a3fe..450c4c0 100644 --- a/gcc/testsuite/gcc.dg/cpp/include6.c +++ b/gcc/testsuite/gcc.dg/cpp/include6.c @@ -3,12 +3,12 @@ #include <stddef.h> #include "stddef.h" -#include L"stddef.h" /* { dg-error "include expects" } */ -#include u"stddef.h" /* { dg-error "include expects" } */ -#include U"stddef.h" /* { dg-error "include expects" } */ -#include u8"stddef.h" /* { dg-error "include expects" } */ -#include R"(stddef.h)" /* { dg-error "include expects" } */ -#include LR"(stddef.h)" /* { dg-error "include expects" } */ -#include uR"(stddef.h)" /* { dg-error "include expects" } */ -#include UR"(stddef.h)" /* { dg-error "include expects" } */ -#include u8R"(stddef.h)" /* { dg-error "include expects" } */ +#include L"stddef.h" /* { dg-error "'#include' expects" } */ +#include u"stddef.h" /* { dg-error "'#include' expects" } */ +#include U"stddef.h" /* { dg-error "'#include' expects" } */ +#include u8"stddef.h" /* { dg-error "'#include' expects" } */ +#include R"(stddef.h)" /* { dg-error "'#include' expects" } */ +#include LR"(stddef.h)" /* { dg-error "'#include' expects" } */ +#include uR"(stddef.h)" /* { dg-error "'#include' expects" } */ +#include UR"(stddef.h)" /* { dg-error "'#include' expects" } */ +#include u8R"(stddef.h)" /* { dg-error "'#include' expects" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/pr35322.c b/gcc/testsuite/gcc.dg/cpp/pr35322.c index 1af9605..91cdcc0 100644 --- a/gcc/testsuite/gcc.dg/cpp/pr35322.c +++ b/gcc/testsuite/gcc.dg/cpp/pr35322.c @@ -1,4 +1,4 @@ /* Test case for PR 35322 -- _Pragma ICE. */ /* { dg-do preprocess } */ -_Pragma("GCC dependency") /* { dg-error "#pragma dependency expects" } */ +_Pragma("GCC dependency") /* { dg-error "'#pragma GCC dependency' expects" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/tr-warn6.c b/gcc/testsuite/gcc.dg/cpp/tr-warn6.c index 137064e..9136f0f 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-warn6.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-warn6.c @@ -4,15 +4,15 @@ /* { dg-do preprocess } */ /* { dg-options "-Wtraditional" } */ -#define foo1(h) sdf "h3" fds "h" /* { dg-warning "macro argument \"h\" would be stringified" "traditional stringification" } */ -#define foo2(h2) sdf "h2" fds "h3" /* { dg-warning "macro argument \"h2\" would be stringified" "traditional stringification" } */ -#define foo3(h3) sdf "h2" fds "h3" /* { dg-warning "macro argument \"h3\" would be stringified" "traditional stringification" } */ -#define foo4(h) sdf 'h3' fds 'h' /* { dg-warning "macro argument \"h\" would be stringified" "traditional stringification" } */ -#define foo5(h2) sdf 'h2' fds 'h3' /* { dg-warning "macro argument \"h2\" would be stringified" "traditional stringification" } */ -#define foo6(h3) sdf 'h2' fds 'h3' /* { dg-warning "macro argument \"h3\" would be stringified" "traditional stringification" } */ -#define foo7(AA, hello, world, EEE) sdf "A B hello C,world,DhelloE F" fds EEE /* { dg-warning "macro argument \"hello\" would be stringified" "traditional stringification" } */ +#define foo1(h) sdf "h3" fds "h" /* { dg-warning "macro argument 'h' would be stringified" "traditional stringification" } */ +#define foo2(h2) sdf "h2" fds "h3" /* { dg-warning "macro argument 'h2' would be stringified" "traditional stringification" } */ +#define foo3(h3) sdf "h2" fds "h3" /* { dg-warning "macro argument 'h3' would be stringified" "traditional stringification" } */ +#define foo4(h) sdf 'h3' fds 'h' /* { dg-warning "macro argument 'h' would be stringified" "traditional stringification" } */ +#define foo5(h2) sdf 'h2' fds 'h3' /* { dg-warning "macro argument 'h2' would be stringified" "traditional stringification" } */ +#define foo6(h3) sdf 'h2' fds 'h3' /* { dg-warning "macro argument 'h3' would be stringified" "traditional stringification" } */ +#define foo7(AA, hello, world, EEE) sdf "A B hello C,world,DhelloE F" fds EEE /* { dg-warning "macro argument 'hello' would be stringified" "traditional stringification" } */ /* Catch the second warning from the above line. */ -/* { dg-warning "macro argument \"world\" would be stringified" "traditional stringification second warning" { target *-*-* } .-2 } */ +/* { dg-warning "macro argument 'world' would be stringified" "traditional stringification second warning" { target *-*-* } .-2 } */ # 19 "sys-header.h" 3 /* We are in system headers now, no -Wtraditional warnings should issue. */ diff --git a/gcc/testsuite/gcc.dg/cpp/undef2.c b/gcc/testsuite/gcc.dg/cpp/undef2.c index f9b047b..b514017 100644 --- a/gcc/testsuite/gcc.dg/cpp/undef2.c +++ b/gcc/testsuite/gcc.dg/cpp/undef2.c @@ -3,11 +3,11 @@ /* { dg-do preprocess } */ -#undef __DATE__ /* { dg-warning "undefining \"__DATE__\"" } */ -#undef __TIME__ /* { dg-warning "undefining \"__TIME__\"" } */ -#undef __FILE__ /* { dg-warning "undefining \"__FILE__\"" } */ -#undef __LINE__ /* { dg-warning "undefining \"__LINE__\"" } */ -#undef __STDC__ /* { dg-warning "undefining \"__STDC__\"" } */ +#undef __DATE__ /* { dg-warning "undefining '__DATE__'" } */ +#undef __TIME__ /* { dg-warning "undefining '__TIME__'" } */ +#undef __FILE__ /* { dg-warning "undefining '__FILE__'" } */ +#undef __LINE__ /* { dg-warning "undefining '__LINE__'" } */ +#undef __STDC__ /* { dg-warning "undefining '__STDC__'" } */ /* These should be protected from #undef, but aren't, because they are set with normal #define commands - and on top of that, some diff --git a/gcc/testsuite/gcc.dg/cpp/warn-comments-2.c b/gcc/testsuite/gcc.dg/cpp/warn-comments-2.c index 3091c9d..2d97274 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-comments-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-comments-2.c @@ -1,7 +1,7 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=comments" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -/* /* */ // { dg-error "\"\.\*\" within comment .-Werror=comment." } +/* /* */ // { dg-error "'\.\*' within comment .-Werror=comment." } // \ // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } .-1 } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-comments-3.c b/gcc/testsuite/gcc.dg/cpp/warn-comments-3.c index bba72f0..ce67302 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-comments-3.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-comments-3.c @@ -1,7 +1,7 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=comment" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -/* /* */ // { dg-error "\"\.\*\" within comment .-Werror=comment." } +/* /* */ // { dg-error "'\.\*' within comment .-Werror=comment." } // \ // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } .-1 } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-comments.c b/gcc/testsuite/gcc.dg/cpp/warn-comments.c index 8d7a575..6830cf8 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-comments.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-comments.c @@ -1,7 +1,7 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wcomments" } -/* /* */ // { dg-warning "4: \"\.\*\" within comment .-Wcomment." } +/* /* */ // { dg-warning "4: '\.\*\' within comment .-Wcomment." } // \ // { dg-warning "1: multi-line comment .-Wcomment." "multi-line" { target *-*-* } .-1 } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c b/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c index 69c4cfa..a8019f3 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=c++-compat" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#define not ! // { dg-error "identifier \"not\" is a special operator name in C\\+\\+ .-Werror=c\\+\\+-compat." } +#define not ! // { dg-error "identifier 'not' is a special operator name in C\\+\\+ .-Werror=c\\+\\+-compat." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat.c b/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat.c index 2e7b259..a0b9bec 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-cxx-compat.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wc++-compat" } -#define not ! // { dg-warning "identifier \"not\" is a special operator name in C\\+\\+ .-Wc\\+\\+-compat." } +#define not ! // { dg-warning "identifier 'not' is a special operator name in C\\+\\+ .-Wc\\+\\+-compat." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c b/gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c index 8bd608a..b1d5c24 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c @@ -1,7 +1,7 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=deprecated" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#assert x(x) // { dg-error "#assert is a deprecated GCC extension .-Werror=deprecated." } +#assert x(x) // { dg-error "'#assert' is a deprecated GCC extension .-Werror=deprecated." } #if #x(x) // { dg-error "assertions are a deprecated extension .-Werror=deprecated." } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-deprecated.c b/gcc/testsuite/gcc.dg/cpp/warn-deprecated.c index 84214b1..e363818 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-deprecated.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-deprecated.c @@ -1,7 +1,7 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wdeprecated" } -#assert x(x) // { dg-warning "#assert is a deprecated GCC extension .-Wdeprecated." } +#assert x(x) // { dg-warning "'#assert' is a deprecated GCC extension .-Wdeprecated." } #if #x(x) // { dg-warning "assertions are a deprecated extension .-Wdeprecated." } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c b/gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c index a39cba4..8f360ea 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c @@ -1,6 +1,6 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Werror=long-long" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#if 0LL // { dg-error "traditional C rejects the \"LL\" suffix .-Werror=long-long." } +#if 0LL // { dg-error "traditional C rejects the 'LL' suffix .-Werror=long-long." } // { dg-error "use of C99 long long integer constant .-Werror=long-long." "use long long" { target *-*-* } .-1 } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-long-long.c b/gcc/testsuite/gcc.dg/cpp/warn-long-long.c index ac39cc8..2096938 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-long-long.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-long-long.c @@ -1,6 +1,6 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Wlong-long" } -#if 0LL // { dg-warning "traditional C rejects the \"LL\" suffix .-Wlong-long." } +#if 0LL // { dg-warning "traditional C rejects the 'LL' suffix .-Wlong-long." } // { dg-warning "use of C99 long long integer constant .-Wlong-long." "use long long" { target *-*-* } .-1 } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-1.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-1.c index c047f5f..a857bc7 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-1.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-1.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wnormalized=nfc" } -\u0F43 // { dg-warning "`.U00000f43' is not in NFC .-Wnormalized=." } +\u0F43 // { dg-warning "'.U00000f43' is not in NFC .-Wnormalized=." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-2.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-2.c index 5c8c7c5..ca00eea 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-2.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wnormalized=nfkc" } -\u00AA // { dg-warning "`.U000000aa' is not in NFKC .-Wnormalized=." } +\u00AA // { dg-warning "'.U000000aa' is not in NFKC .-Wnormalized=." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c index 225fc4d..19be4dc 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=normalized=nfc" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -\u0F43 // { dg-error "`.U00000f43' is not in NFC .-Werror=normalized=." } +\u0F43 // { dg-error "'.U00000f43' is not in NFC .-Werror=normalized=." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c index e6e1f3e..e3b7a96 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c @@ -8,13 +8,13 @@ The UTF-8 encoding of U+0F43 TIBETAN LETTER GHA is: E0 BD 83. */ -foo before_\u0F43_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." } +foo before_\u0F43_after bar // { dg-error "'before_.U00000f43_after' is not in NFC .-Werror=normalized=." } /* { dg-begin-multiline-output "" } foo before_\u0F43_after bar ^~~~~~~~~~~~~~~~~~~ { dg-end-multiline-output "" } */ -foo before_གྷ_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." } +foo before_གྷ_after bar // { dg-error "'before_.U00000f43_after' is not in NFC .-Werror=normalized=." } /* { dg-begin-multiline-output "" } foo before_<e0><bd><83>_after bar ^~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c index f9f2f7a..5dd1e1e 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c @@ -6,13 +6,13 @@ U+0F42 TIBETAN LETTER GA: ག U+0FB7 TIBETAN SUBJOINED LETTER HA: ྷ */ -foo before_\u0F43_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." } +foo before_\u0F43_after bar // { dg-error "'before_.U00000f43_after' is not in NFC .-Werror=normalized=." } /* { dg-begin-multiline-output "" } foo before_\u0F43_after bar ^~~~~~~~~~~~~~~~~~~ { dg-end-multiline-output "" } */ -foo before_གྷ_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." } +foo before_གྷ_after bar // { dg-error "'before_.U00000f43_after' is not in NFC .-Werror=normalized=." } /* { dg-begin-multiline-output "" } foo before_<U+0F43>_after bar ^~~~~~~~~~~~~~~~~~~~~ diff --git a/gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c b/gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c index 3e2e57a..df8de47 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c @@ -6,13 +6,13 @@ // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 } #endif -#define __TIME__ "X" // { dg-error "\"__TIME__\" redefined .-Werror=builtin-macro-redefined." } +#define __TIME__ "X" // { dg-error "'__TIME__' redefined .-Werror=builtin-macro-redefined." } #define __TIME__ "Y" // { dg-bogus "-Wbuiltin-macro-redefined" } - // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 } + // { dg-warning "'__TIME__' redefined" "not-builtin-1" { target *-*-* } .-1 } // { dg-message "previous definition" "previous-1" { target *-*-* } 9 } #define X "X" #define X "Y" // { dg-bogus "-Wbuiltin-macro-redefined" } - // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 } + // { dg-warning "'X' redefined" "not-builtin-2" { target *-*-* } .-1 } // { dg-message "previous definition" "previous-2" { target *-*-* } 15 } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-redefined.c b/gcc/testsuite/gcc.dg/cpp/warn-redefined.c index c562d07..0d6a322 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-redefined.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-redefined.c @@ -6,13 +6,13 @@ // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 } #endif -#define __TIME__ "X" // { dg-warning "\"__TIME__\" redefined .-Wbuiltin-macro-redefined." } +#define __TIME__ "X" // { dg-warning "'__TIME__' redefined .-Wbuiltin-macro-redefined." } #define __TIME__ "Y" // { dg-bogus "-Wbuiltin-macro-redefined" } - // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 } + // { dg-warning "'__TIME__' redefined" "not-builtin-1" { target *-*-* } .-1 } // { dg-message "previous definition" "previous-1" { target *-*-* } 9 } #define X "X" #define X "Y" // { dg-bogus "-Wbuiltin-macro-redefined" } - // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 } + // { dg-warning "'X' redefined" "not-builtin-2" { target *-*-* } .-1 } // { dg-message "previous definition" "previous-2" { target *-*-* } 15 } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c b/gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c index 05477af..71da781 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c @@ -1,18 +1,18 @@ // { dg-do compile } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=traditional -Wno-deprecated -Wno-long-long" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#assert x(x) // { dg-error "suggest hiding #assert from traditional C with an indented # .-Werror=traditional." } +#assert x(x) // { dg-error "suggest hiding '#assert' from traditional C with an indented '#' .-Werror=traditional." } - #define X X // { dg-error "traditional C ignores #define with the # indented .-Werror=traditional." } + #define X X // { dg-error "traditional C ignores '#define' with the '#' indented .-Werror=traditional." } #if 0 -#elif 1 // { dg-error "suggest not using #elif in traditional C .-Werror=traditional." } +#elif 1 // { dg-error "suggest not using '#elif' in traditional C .-Werror=traditional." } #endif #define f(X) X -int f; // { dg-error "function-like macro \"f\" must be used with arguments in traditional C .-Werror=traditional." } +int f; // { dg-error "function-like macro 'f' must be used with arguments in traditional C .-Werror=traditional." } -#if 0U // { dg-error "traditional C rejects the \"U\" suffix .-Werror=traditional." } +#if 0U // { dg-error "traditional C rejects the 'U' suffix .-Werror=traditional." } #endif #if +1 // { dg-error " traditional C rejects the unary plus operator .-Werror=traditional." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-traditional.c b/gcc/testsuite/gcc.dg/cpp/warn-traditional.c index f72f6db..4b46e58 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-traditional.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-traditional.c @@ -1,18 +1,18 @@ // { dg-do compile } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Wno-deprecated -Wno-long-long" } -#assert x(x) // { dg-warning "suggest hiding #assert from traditional C with an indented # .-Wtraditional." } +#assert x(x) // { dg-warning "suggest hiding '#assert' from traditional C with an indented '#' .-Wtraditional." } - #define X X // { dg-warning "traditional C ignores #define with the # indented .-Wtraditional." } + #define X X // { dg-warning "traditional C ignores '#define' with the '#' indented .-Wtraditional." } #if 0 -#elif 1 // { dg-warning "suggest not using #elif in traditional C .-Wtraditional." } +#elif 1 // { dg-warning "suggest not using '#elif' in traditional C .-Wtraditional." } #endif #define f(X) X -int f; // { dg-warning "function-like macro \"f\" must be used with arguments in traditional C .-Wtraditional." } +int f; // { dg-warning "function-like macro 'f' must be used with arguments in traditional C .-Wtraditional." } -#if 0U // { dg-warning "traditional C rejects the \"U\" suffix .-Wtraditional." } +#if 0U // { dg-warning "traditional C rejects the 'U' suffix .-Wtraditional." } #endif #if +1 // { dg-warning " traditional C rejects the unary plus operator .-Wtraditional." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-1.c b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-1.c index 4f3779d..1c2732e 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-1.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-1.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -trigraphs -Wtrigraphs" } -??= // { dg-warning "trigraph \\?\\?= converted to # .-Wtrigraphs." } +??= // { dg-warning "trigraph '\\?\\?=' converted to '#' .-Wtrigraphs." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-2.c b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-2.c index ff87ae5..1404c14 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-2.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtrigraphs" } -??= // { dg-warning "trigraph \\?\\?= ignored, use -trigraphs to enable .-Wtrigraphs." } +??= // { dg-warning "trigraph '\\?\\?=' ignored, use '-trigraphs' to enable .-Wtrigraphs." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c index e7537c8..0918ecd 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -trigraphs -Werror=trigraphs" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -??= // { dg-error "trigraph \\?\\?= converted to # .-Werror=trigraphs." } +??= // { dg-error "trigraph '\\?\\?=' converted to '#' .-Werror=trigraphs." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c index d8333d4..4430256 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=trigraphs" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -??= // { dg-error "trigraph \\?\\?= ignored, use -trigraphs to enable .-Werror=trigraphs." } +??= // { dg-error "trigraph '\\?\\?=' ignored, use '-trigraphs' to enable .-Werror=trigraphs." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-undef-2.c b/gcc/testsuite/gcc.dg/cpp/warn-undef-2.c index e71aeba..e572387 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-undef-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-undef-2.c @@ -1,5 +1,5 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=undef" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#if x // { dg-error "\"x\" is not defined, evaluates to 0 .-Werror=undef." } +#if x // { dg-error "'x' is not defined, evaluates to '0' .-Werror=undef." } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-undef.c b/gcc/testsuite/gcc.dg/cpp/warn-undef.c index 2c2c421..786fa89 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-undef.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-undef.c @@ -1,5 +1,5 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wundef" } -#if x // { dg-warning "\"x\" is not defined, evaluates to 0 .-Wundef." } +#if x // { dg-warning "'x' is not defined, evaluates to '0' .-Wundef." } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c b/gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c index 7c3efe0..a3cdd07 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=unused-macros" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#define X X // { dg-error "9:macro \"X\" is not used .-Werror=unused-macros." } +#define X X // { dg-error "9:macro 'X' is not used .-Werror=unused-macros." } diff --git a/gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c b/gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c index 74df239..93bd8b7 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c @@ -1,4 +1,4 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wunused-macros" } -#define X X // { dg-warning "9:macro \"X\" is not used .-Wunused-macros." } +#define X X // { dg-warning "9:macro 'X' is not used .-Wunused-macros." } diff --git a/gcc/testsuite/gcc.dg/pch/counter-2.c b/gcc/testsuite/gcc.dg/pch/counter-2.c index c0d25bf..ccf4548 100644 --- a/gcc/testsuite/gcc.dg/pch/counter-2.c +++ b/gcc/testsuite/gcc.dg/pch/counter-2.c @@ -7,7 +7,7 @@ #error __COUNTER__ != 0 #endif -#include "counter-2.h" /* { dg-warning "not used because `__COUNTER__' is invalid" } */ +#include "counter-2.h" /* { dg-warning "not used because '__COUNTER__' is invalid" } */ /* { dg-error "counter-2.h: No such file or directory" "no such file" { target *-*-* } 0 } */ /* { dg-error "one or more PCH files were found, but they were invalid" "invalid files" { target *-*-* } .-2 } */ /* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in index 7e47153..eff0dd6 100644 --- a/libcpp/Makefile.in +++ b/libcpp/Makefile.in @@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES) --keyword=SYNTAX_ERROR --keyword=SYNTAX_ERROR2 \ --copyright-holder="Free Software Foundation, Inc." \ --msgid-bugs-address="https://gcc.gnu.org/bugs/" \ - --language=c -o po/$(PACKAGE).pot.tmp $^ + --language=GCC-source -o po/$(PACKAGE).pot.tmp $^ sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot rm po/$(PACKAGE).pot.tmp diff --git a/libcpp/charset.cc b/libcpp/charset.cc index 32b6fd5..c7d4508 100644 --- a/libcpp/charset.cc +++ b/libcpp/charset.cc @@ -867,8 +867,8 @@ cpp_host_to_exec_charset (cpp_reader *pfile, cppchar_t c) if (c > LAST_POSSIBLY_BASIC_SOURCE_CHAR) { cpp_error (pfile, CPP_DL_ICE, - "character 0x%lx is not in the basic source character set\n", - (unsigned long)c); + "character 0x%lx is not in the basic source character set", + (unsigned long) c); return 0; } @@ -1550,10 +1550,10 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, else if (CPP_OPTION (pfile, cpp_warn_c90_c99_compat) > 0 && !CPP_OPTION (pfile, cplusplus)) cpp_error (pfile, CPP_DL_WARNING, - "C99's universal character names are incompatible with C90"); + "C99%'s universal character names are incompatible with C90"); else if (CPP_WTRADITIONAL (pfile) && identifier_pos == 0) cpp_warning (pfile, CPP_W_TRADITIONAL, - "the meaning of '\\%c' is different in traditional C", + "the meaning of %<\\%c%> is different in traditional C", (int) str[-1]); result = 0; @@ -1592,7 +1592,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, *cp = 0; return false; } - cpp_error (pfile, CPP_DL_ERROR, "'\\N' not followed by '{'"); + cpp_error (pfile, CPP_DL_ERROR, "%<\\N%> not followed by %<{%>"); } else { @@ -1656,13 +1656,13 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, && (!CPP_OPTION (pfile, delimited_escape_seqs) || !strict)) ret = cpp_warning (pfile, CPP_W_UNICODE, - "\\N{%.*s} is not a valid " + "%<\\N{%.*s}%> is not a valid " "universal character; treating it " "as separate tokens", (int) (str - name), name); else cpp_error (pfile, CPP_DL_ERROR, - "\\N{%.*s} is not a valid universal " + "%<\\N{%.*s}%> is not a valid universal " "character", (int) (str - name), name); /* Try to do a loose name lookup according to @@ -1672,7 +1672,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, str - name, canon_name); if (result != (cppchar_t) -1 && ret) cpp_error (pfile, CPP_DL_NOTE, - "did you mean \\N{%s}?", canon_name); + "did you mean %<\\N{%s}%>?", canon_name); else result = 0xC0; if (identifier_pos @@ -1690,7 +1690,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, else if (identifier_pos) { cpp_warning (pfile, CPP_W_UNICODE, - "'\\N{' not terminated with '}' after %.*s; " + "%<\\N{%> not terminated with %<}%> after %.*s; " "treating it as separate tokens", (int) (str - base), base); *cp = 0; @@ -1699,7 +1699,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, else { cpp_error (pfile, CPP_DL_ERROR, - "'\\N{' not terminated with '}' after %.*s", + "%<\\N{%> not terminated with %<}%> after %.*s", (int) (str - base), base); result = 1; } @@ -1707,7 +1707,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, } else { - cpp_error (pfile, CPP_DL_ICE, "In _cpp_valid_ucn but not a UCN"); + cpp_error (pfile, CPP_DL_ICE, "in %<_cpp_valid_ucn%> but not a UCN"); length = 4; } @@ -1775,7 +1775,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, { if (delimited) cpp_warning (pfile, CPP_W_UNICODE, - "'\\u{' not terminated with '}' after %.*s; " + "%<\\u{%> not terminated with %<}%> after %.*s; " "treating it as separate tokens", (int) (str - base), base); *cp = 0; @@ -1791,7 +1791,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, (int) (str - base), base); else cpp_error (pfile, CPP_DL_ERROR, - "'\\u{' not terminated with '}' after %.*s", + "%<\\u{%> not terminated with %<}%> after %.*s", (int) (str - base), base); result = 1; } @@ -1821,7 +1821,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) { CPP_OPTION (pfile, warn_dollars) = 0; - cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number"); + cpp_error (pfile, CPP_DL_PEDWARN, "%<$%> in identifier or number"); } NORMALIZE_STATE_UPDATE_IDNUM (nst, result); } @@ -2096,7 +2096,7 @@ convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, if (CPP_WTRADITIONAL (pfile)) cpp_warning (pfile, CPP_W_TRADITIONAL, - "the meaning of '\\x' is different in traditional C"); + "the meaning of %<\\x%> is different in traditional C"); /* Skip 'x'. */ from++; @@ -2144,13 +2144,13 @@ convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, if (!digits_found) { cpp_error (pfile, CPP_DL_ERROR, - "\\x used with no following hex digits"); + "%<\\x%> used with no following hex digits"); return from; } else if (delimited) { cpp_error (pfile, CPP_DL_ERROR, - "'\\x{' not terminated with '}' after %.*s", + "%<\\x{%> not terminated with %<}%> after %.*s", (int) (from - base), base); return from; } @@ -2201,7 +2201,7 @@ convert_oct (cpp_reader *pfile, const uchar *from, const uchar *limit, from++; extend_char_range (&char_range, loc_reader); if (from == limit || *from != '{') - cpp_error (pfile, CPP_DL_ERROR, "'\\o' not followed by '{'"); + cpp_error (pfile, CPP_DL_ERROR, "%<\\o%> not followed by %<}%>"); else { from++; @@ -2247,7 +2247,7 @@ convert_oct (cpp_reader *pfile, const uchar *from, const uchar *limit, else { cpp_error (pfile, CPP_DL_ERROR, - "'\\o{' not terminated with '}' after %.*s", + "%<\\o{%> not terminated with %<}%> after %.*s", (int) (from - base), base); return from; } @@ -2309,7 +2309,7 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, if (uneval) cpp_pedwarning (pfile, CPP_W_PEDANTIC, "numeric escape sequence in unevaluated string: " - "'\\%c'", (int) c); + "%<\\%c%>", (int) c); return convert_hex (pfile, from, limit, tbuf, cvt, char_range, loc_reader, ranges); @@ -2319,7 +2319,7 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, if (uneval) cpp_pedwarning (pfile, CPP_W_PEDANTIC, "numeric escape sequence in unevaluated string: " - "'\\%c'", (int) c); + "%<\\%c%>", (int) c); return convert_oct (pfile, from, limit, tbuf, cvt, char_range, loc_reader, ranges); @@ -2346,13 +2346,13 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, case 'a': if (CPP_WTRADITIONAL (pfile)) cpp_warning (pfile, CPP_W_TRADITIONAL, - "the meaning of '\\a' is different in traditional C"); + "the meaning of %<\\a%> is different in traditional C"); c = charconsts[0]; break; case 'e': case 'E': cpp_pedwarning (pfile, CPP_W_PEDANTIC, - "non-ISO-standard escape sequence, '\\%c'", (int) c); + "non-ISO-standard escape sequence, %<\\%c%>", (int) c); c = charconsts[2]; break; @@ -2360,7 +2360,7 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, unknown: if (ISGRAPH (c)) cpp_error (pfile, CPP_DL_PEDWARN, - "unknown escape sequence: '\\%c'", (int) c); + "unknown escape sequence: %<\\%c%>", (int) c); else { encoding_rich_location rich_loc (pfile); @@ -2370,7 +2370,7 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, char buf[32]; sprintf(buf, "%03o", (int) c); cpp_error_at (pfile, CPP_DL_PEDWARN, &rich_loc, - "unknown escape sequence: '\\%s'", buf); + "unknown escape sequence: %<\\%s%>", buf); } } @@ -2655,7 +2655,7 @@ cpp_interpret_string_ranges (cpp_reader *pfile, const cpp_string *from, bool (*saved_diagnostic_handler) (cpp_reader *, enum cpp_diagnostic_level, enum cpp_warning_reason, rich_location *, const char *, va_list *) - ATTRIBUTE_FPTR_PRINTF(5,0); + ATTRIBUTE_CPP_PPDIAG (5, 0); saved_diagnostic_handler = pfile->cb.diagnostic; pfile->cb.diagnostic = noop_diagnostic_cb; @@ -2704,7 +2704,7 @@ count_source_chars (cpp_reader *pfile, cpp_string str, cpp_ttype type) bool (*saved_diagnostic_handler) (cpp_reader *, enum cpp_diagnostic_level, enum cpp_warning_reason, rich_location *, const char *, va_list *) - ATTRIBUTE_FPTR_PRINTF(5,0); + ATTRIBUTE_CPP_PPDIAG (5, 0); saved_diagnostic_handler = pfile->cb.diagnostic; pfile->cb.diagnostic = noop_diagnostic_cb; convert_f save_func = pfile->narrow_cset_desc.func; @@ -2803,7 +2803,7 @@ narrow_str_to_charconst (cpp_reader *pfile, cpp_string str, if (type != CPP_UTF8CHAR) cpp_error (pfile, CPP_DL_WARNING, "multi-character literal with %ld characters exceeds " - "'int' size of %ld bytes", (long) i, (long) max_chars); + "%<int%> size of %ld bytes", (long) i, (long) max_chars); else if (src_chars > 2) cpp_error (pfile, CPP_DL_ERROR, "multi-character literal cannot have an encoding prefix"); diff --git a/libcpp/directives.cc b/libcpp/directives.cc index 9c906b3..50fa8ace2 100644 --- a/libcpp/directives.cc +++ b/libcpp/directives.cc @@ -239,7 +239,7 @@ check_eol_1 (cpp_reader *pfile, bool expand, enum cpp_warning_reason reason) if (! SEEN_EOL () && (expand ? cpp_get_token (pfile) : _cpp_lex_token (pfile))->type != CPP_EOF) - cpp_pedwarning (pfile, reason, "extra tokens at end of #%s directive", + cpp_pedwarning (pfile, reason, "extra tokens at end of %<#%s%> directive", pfile->directive->name); } @@ -391,8 +391,8 @@ directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) if (dir->origin == EXTENSION && !(dir == &dtable[T_IMPORT] && CPP_OPTION (pfile, objc))) warned - = cpp_pedwarning (pfile, CPP_W_PEDANTIC, "#%s is a GCC extension", - dir->name); + = cpp_pedwarning (pfile, CPP_W_PEDANTIC, + "%<#%s%> is a GCC extension", dir->name); if (!warned && dir == &dtable[T_WARNING]) { if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, warning_directive)) @@ -400,18 +400,18 @@ directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) if (CPP_OPTION (pfile, cplusplus)) warned = cpp_pedwarning (pfile, CPP_W_CXX23_EXTENSIONS, - "#%s before C++23 is a GCC extension", + "%<#%s%> before C++23 is a GCC extension", dir->name); else warned = cpp_pedwarning (pfile, CPP_W_PEDANTIC, - "#%s before C23 is a GCC extension", + "%<#%s%> before C23 is a GCC extension", dir->name); } if (!warned && CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0) warned = cpp_warning (pfile, CPP_W_C11_C23_COMPAT, - "#%s before C23 is a GCC extension", + "%<#%s%> before C23 is a GCC extension", dir->name); } @@ -419,7 +419,7 @@ directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) || (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc))) && !warned) cpp_warning (pfile, CPP_W_DEPRECATED, - "#%s is a deprecated GCC extension", dir->name); + "%<#%s%> is a deprecated GCC extension", dir->name); } /* Traditionally, a directive is ignored unless its # is in @@ -432,15 +432,15 @@ directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) { if (dir == &dtable[T_ELIF]) cpp_warning (pfile, CPP_W_TRADITIONAL, - "suggest not using #elif in traditional C"); + "suggest not using %<#elif%> in traditional C"); else if (indented && dir->origin == KANDR) cpp_warning (pfile, CPP_W_TRADITIONAL, - "traditional C ignores #%s with the # indented", + "traditional C ignores %<#%s%> with the %<#%> indented", dir->name); else if (!indented && dir->origin != KANDR) cpp_warning (pfile, CPP_W_TRADITIONAL, - "suggest hiding #%s from traditional C with an indented #", - dir->name); + "suggest hiding %<#%s%> from traditional C with an " + "indented %<#%>", dir->name); } } @@ -652,17 +652,17 @@ lex_macro_node (cpp_reader *pfile, bool is_def_or_undef) if (is_def_or_undef && node == pfile->spec_nodes.n_defined) cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" cannot be used as a macro name", + "%qs cannot be used as a macro name", NODE_NAME (node)); else if (! (node->flags & NODE_POISONED)) return node; } else if (token->flags & NAMED_OP) cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" cannot be used as a macro name as it is an operator in C++", - NODE_NAME (token->val.node.node)); + "%qs cannot be used as a macro name as it is an operator " + "in C++", NODE_NAME (token->val.node.node)); else if (token->type == CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "no macro name given in #%s directive", + cpp_error (pfile, CPP_DL_ERROR, "no macro name given in %<#%s%> directive", pfile->directive->name); else cpp_error (pfile, CPP_DL_ERROR, "macro names must be identifiers"); @@ -739,11 +739,11 @@ do_undef (cpp_reader *pfile) { if (node->flags & NODE_WARN) cpp_error (pfile, CPP_DL_WARNING, - "undefining \"%s\"", NODE_NAME (node)); + "undefining %qs", NODE_NAME (node)); else if (cpp_builtin_macro_p (node) && CPP_OPTION (pfile, warn_builtin_macro_redefined)) cpp_warning (pfile, CPP_W_BUILTIN_MACRO_REDEFINED, - "undefining \"%s\"", NODE_NAME (node)); + "undefining %qs", NODE_NAME (node)); if (node->value.macro && CPP_OPTION (pfile, warn_unused_macros)) @@ -800,7 +800,8 @@ glue_header_name (cpp_reader *pfile) break; if (token->type == CPP_EOF) { - cpp_error (pfile, CPP_DL_ERROR, "missing terminating > character"); + cpp_error (pfile, CPP_DL_ERROR, + "missing terminating %<>%> character"); break; } @@ -856,11 +857,11 @@ parse_include (cpp_reader *pfile, int *pangle_brackets, const unsigned char *dir; if (pfile->directive == &dtable[T_PRAGMA]) - dir = UC"pragma dependency"; + dir = UC"pragma GCC dependency"; else dir = pfile->directive->name; - cpp_error (pfile, CPP_DL_ERROR, "#%s expects \"FILENAME\" or <FILENAME>", - dir); + cpp_error (pfile, CPP_DL_ERROR, + "%<#%s%> expects %<\"FILENAME\"%> or %<<FILENAME>%>", dir); return NULL; } @@ -915,8 +916,8 @@ do_include_common (cpp_reader *pfile, enum include_type type) if (pfile->line_table->depth >= CPP_OPTION (pfile, max_include_depth)) cpp_error (pfile, CPP_DL_ERROR, - "#include nested depth %u exceeds maximum of %u" - " (use -fmax-include-depth=DEPTH to increase the maximum)", + "%<#include%> nested depth %u exceeds maximum of %u" + " (use %<-fmax-include-depth=DEPTH%> to increase the maximum)", pfile->line_table->depth, CPP_OPTION (pfile, max_include_depth)); else @@ -960,7 +961,7 @@ do_include_next (cpp_reader *pfile) if (_cpp_in_main_source_file (pfile)) { cpp_error (pfile, CPP_DL_WARNING, - "#include_next in primary source file"); + "%<#include_next%> in primary source file"); type = IT_INCLUDE; } do_include_common (pfile, type); @@ -1115,7 +1116,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) { if (params->has_embed) { - cpp_error (pfile, CPP_DL_ERROR, "expected ')'"); + cpp_error (pfile, CPP_DL_ERROR, "expected %<)%>"); return false; } } @@ -1132,8 +1133,9 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) if (!params->has_embed) cpp_error_with_line (pfile, CPP_DL_ERROR, params->base64.base_run.base->src_loc, 0, - "'gnu::base64' parameter conflicts with " - "'limit' or 'gnu::offset' parameters"); + "%<gnu::base64%> parameter conflicts " + "with %<limit%> or %<gnu::offset%> " + "parameters"); } else if (params->base64.count == 0 && CPP_OPTION (pfile, preprocessed)) @@ -1141,7 +1143,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) ret = false; if (!params->has_embed) cpp_error_with_line (pfile, CPP_DL_ERROR, params->loc, 0, - "'gnu::base64' parameter required in " + "%<gnu::base64%> parameter required in " "preprocessed source"); } return ret; @@ -1162,7 +1164,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) token = _cpp_get_token_no_padding (pfile); if (token->type != CPP_COLON) { - cpp_error (pfile, CPP_DL_ERROR, "expected ':'"); + cpp_error (pfile, CPP_DL_ERROR, "expected %<:%>"); return false; } token = _cpp_get_token_no_padding (pfile); @@ -1250,7 +1252,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) } if (param_kind != (size_t) -1 && token->type != CPP_OPEN_PAREN) cpp_error_with_line (pfile, CPP_DL_ERROR, loc, 0, - "expected '('"); + "expected %<(%>"); else if (param_kind == EMBED_PARAM_LIMIT || param_kind == EMBED_PARAM_GNU_OFFSET) { @@ -1263,7 +1265,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) { if (res > INTTYPE_MAXIMUM (off_t)) cpp_error_with_line (pfile, CPP_DL_ERROR, loc, 0, - "too large 'gnu::offset' argument"); + "too large %<gnu::offset%> argument"); else params->offset = res; } @@ -1305,7 +1307,7 @@ _cpp_parse_embed_params (cpp_reader *pfile, struct cpp_embed_params *params) while (token->type == CPP_STRING); if (token->type != CPP_CLOSE_PAREN) cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, 0, - "expected ')'"); + "expected %<)%>"); } else { @@ -1355,7 +1357,7 @@ do_embed (cpp_reader *pfile) if (CPP_OPTION (pfile, traditional)) { cpp_error (pfile, CPP_DL_ERROR, /* FIXME should be DL_SORRY */ - "#embed not supported in traditional C"); + "%<#embed%> not supported in traditional C"); skip_rest_of_line (pfile); goto done; } @@ -1364,10 +1366,10 @@ do_embed (cpp_reader *pfile) { if (CPP_OPTION (pfile, cplusplus)) cpp_error (pfile, CPP_DL_PEDWARN, - "#%s is a GCC extension", "embed"); + "%<#%s%> is a GCC extension", "embed"); else cpp_error (pfile, CPP_DL_PEDWARN, - "#%s before C23 is a GCC extension", "embed"); + "%<#%s%> before C23 is a GCC extension", "embed"); } fname = parse_include (pfile, &angle_brackets, NULL, ¶ms.loc); @@ -1425,7 +1427,7 @@ read_flag (cpp_reader *pfile, unsigned int last) } if (token->type != CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "invalid flag \"%s\" in line directive", + cpp_error (pfile, CPP_DL_ERROR, "invalid flag %qs in line directive", cpp_token_as_text (pfile, token)); return 0; } @@ -1492,10 +1494,11 @@ do_line (cpp_reader *pfile) &new_lineno, &wrapped)) { if (token->type == CPP_EOF) - cpp_error (pfile, CPP_DL_ERROR, "unexpected end of file after #line"); + cpp_error (pfile, CPP_DL_ERROR, + "unexpected end of file after %<#line%>"); else cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" after #line is not a positive integer", + "%qs after %<#line%> is not a positive integer", cpp_token_as_text (pfile, token)); return; } @@ -1517,7 +1520,7 @@ do_line (cpp_reader *pfile) } else if (token->type != CPP_EOF) { - cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", + cpp_error (pfile, CPP_DL_ERROR, "%qs is not a valid filename", cpp_token_as_text (pfile, token)); return; } @@ -1558,7 +1561,7 @@ do_linemarker (cpp_reader *pfile) /* Unlike #line, there does not seem to be a way to get an EOF here. So, it should be safe to always spell the token. */ cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" after # is not a positive integer", + "%qs after %<#%> is not a positive integer", cpp_token_as_text (pfile, token)); return; } @@ -1598,7 +1601,7 @@ do_linemarker (cpp_reader *pfile) } else if (token->type != CPP_EOF) { - cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", + cpp_error (pfile, CPP_DL_ERROR, "%qs is not a valid filename", cpp_token_as_text (pfile, token)); return; } @@ -1625,7 +1628,7 @@ do_linemarker (cpp_reader *pfile) if (!from) { cpp_warning (pfile, CPP_W_NONE, - "file \"%s\" linemarker ignored due to " + "file %qs linemarker ignored due to " "incorrect nesting", new_file); return; } @@ -1794,7 +1797,7 @@ register_pragma_1 (cpp_reader *pfile, const char *space, const char *name, else if (entry->allow_expansion != allow_name_expansion) { cpp_error (pfile, CPP_DL_ICE, - "registering pragmas in namespace \"%s\" with mismatched " + "registering pragmas in namespace %qs with mismatched " "name expansion", space); return NULL; } @@ -1803,7 +1806,7 @@ register_pragma_1 (cpp_reader *pfile, const char *space, const char *name, else if (allow_name_expansion) { cpp_error (pfile, CPP_DL_ICE, - "registering pragma \"%s\" with name expansion " + "registering pragma %qs with name expansion " "and no namespace", name); return NULL; } @@ -1821,13 +1824,14 @@ register_pragma_1 (cpp_reader *pfile, const char *space, const char *name, if (entry->is_nspace) clash: cpp_error (pfile, CPP_DL_ICE, - "registering \"%s\" as both a pragma and a pragma namespace", + "registering %qs as both a pragma and a pragma namespace", NODE_NAME (node)); else if (space) - cpp_error (pfile, CPP_DL_ICE, "#pragma %s %s is already registered", + cpp_error (pfile, CPP_DL_ICE, "%<#pragma %s %s%> is already registered", space, name); else - cpp_error (pfile, CPP_DL_ICE, "#pragma %s is already registered", name); + cpp_error (pfile, CPP_DL_ICE, "%<#pragma %s%> is already registered", + name); return NULL; } @@ -2075,7 +2079,7 @@ do_pragma_once (cpp_reader *pfile) { if (_cpp_in_main_source_file (pfile)) cpp_warning (pfile, CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER, - "'#pragma once' in main file"); + "%<#pragma once%> in main file"); check_eol (pfile, false); _cpp_mark_file_once_only (pfile, pfile->buffer->file); @@ -2098,7 +2102,7 @@ do_pragma_push_macro (cpp_reader *pfile) { location_t src_loc = pfile->cur_token[-1].src_loc; cpp_error_with_line (pfile, CPP_DL_ERROR, src_loc, 0, - "invalid #pragma push_macro directive"); + "invalid %<#pragma push_macro%> directive"); check_eol (pfile, false); skip_rest_of_line (pfile); return; @@ -2155,7 +2159,7 @@ do_pragma_pop_macro (cpp_reader *pfile) { location_t src_loc = pfile->cur_token[-1].src_loc; cpp_error_with_line (pfile, CPP_DL_ERROR, src_loc, 0, - "invalid #pragma pop_macro directive"); + "invalid %<#pragma pop_macro%> directive"); check_eol (pfile, false); skip_rest_of_line (pfile); return; @@ -2210,7 +2214,7 @@ do_pragma_poison (cpp_reader *pfile) if (tok->type != CPP_NAME) { cpp_error (pfile, CPP_DL_ERROR, - "invalid #pragma GCC poison directive"); + "invalid %<#pragma GCC poison%> directive"); break; } @@ -2219,7 +2223,7 @@ do_pragma_poison (cpp_reader *pfile) continue; if (cpp_macro_p (hp)) - cpp_error (pfile, CPP_DL_WARNING, "poisoning existing macro \"%s\"", + cpp_error (pfile, CPP_DL_WARNING, "poisoning existing macro %qs", NODE_NAME (hp)); _cpp_free_definition (hp); hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; @@ -2241,7 +2245,7 @@ do_pragma_system_header (cpp_reader *pfile) { if (_cpp_in_main_source_file (pfile)) cpp_error (pfile, CPP_DL_WARNING, - "#pragma system_header ignored outside include file"); + "%<#pragma system_header%> ignored outside include file"); else { check_eol (pfile, false); @@ -2294,7 +2298,7 @@ do_pragma_warning_or_error (cpp_reader *pfile, bool error) CPP_STRING) || str.len == 0) { - cpp_error (pfile, CPP_DL_ERROR, "invalid \"#pragma GCC %s\" directive", + cpp_error (pfile, CPP_DL_ERROR, "invalid %<#pragma GCC %s%> directive", error ? "error" : "warning"); return; } @@ -2502,7 +2506,7 @@ _cpp_do__Pragma (cpp_reader *pfile, location_t expansion_loc) return 1; } cpp_error (pfile, CPP_DL_ERROR, - "_Pragma takes a parenthesized string literal"); + "%<_Pragma%> takes a parenthesized string literal"); return 0; } @@ -2585,12 +2589,12 @@ do_else (cpp_reader *pfile) struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#else without #if"); + cpp_error (pfile, CPP_DL_ERROR, "%<#else%> without %<#if%>"); else { if (ifs->type == T_ELSE) { - cpp_error (pfile, CPP_DL_ERROR, "#else after #else"); + cpp_error (pfile, CPP_DL_ERROR, "%<#else%> after %<#else%>"); cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, "the conditional began here"); } @@ -2618,12 +2622,13 @@ do_elif (cpp_reader *pfile) struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#%s without #if", pfile->directive->name); + cpp_error (pfile, CPP_DL_ERROR, "%<#%s%> without %<#if%>", + pfile->directive->name); else { if (ifs->type == T_ELSE) { - cpp_error (pfile, CPP_DL_ERROR, "#%s after #else", + cpp_error (pfile, CPP_DL_ERROR, "%<#%s%> after %<#else%>", pfile->directive->name); cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, "the conditional began here"); @@ -2646,11 +2651,11 @@ do_elif (cpp_reader *pfile) { if (CPP_OPTION (pfile, cplusplus)) cpp_pedwarning (pfile, CPP_W_CXX23_EXTENSIONS, - "#%s before C++23 is a GCC extension", + "%<#%s%> before C++23 is a GCC extension", pfile->directive->name); else cpp_pedwarning (pfile, CPP_W_PEDANTIC, - "#%s before C23 is a GCC extension", + "%<#%s%> before C23 is a GCC extension", pfile->directive->name); } pfile->state.skipping = 1; @@ -2685,11 +2690,13 @@ do_elif (cpp_reader *pfile) { if (CPP_OPTION (pfile, cplusplus)) cpp_pedwarning (pfile, CPP_W_CXX23_EXTENSIONS, - "#%s before C++23 is a GCC extension", + "%<#%s%> before C++23 is a GCC " + "extension", pfile->directive->name); else cpp_pedwarning (pfile, CPP_W_PEDANTIC, - "#%s before C23 is a GCC extension", + "%<#%s%> before C23 is a GCC " + "extension", pfile->directive->name); } pfile->state.skipping = skip; @@ -2725,7 +2732,7 @@ do_endif (cpp_reader *pfile) struct if_stack *ifs = buffer->if_stack; if (ifs == NULL) - cpp_error (pfile, CPP_DL_ERROR, "#endif without #if"); + cpp_error (pfile, CPP_DL_ERROR, "%<#endif%> without %<#if%>"); else { /* Only check EOL if was not originally skipping. */ @@ -2810,7 +2817,7 @@ parse_answer (cpp_reader *pfile, int type, location_t pred_loc, return true; cpp_error_with_line (pfile, CPP_DL_ERROR, pred_loc, 0, - "missing '(' after predicate"); + "missing %<(%> after predicate"); return false; } @@ -2828,7 +2835,7 @@ parse_answer (cpp_reader *pfile, int type, location_t pred_loc, if (token->type == CPP_EOF) { - cpp_error (pfile, CPP_DL_ERROR, "missing ')' to complete answer"); + cpp_error (pfile, CPP_DL_ERROR, "missing %<)%> to complete answer"); return false; } @@ -2840,7 +2847,7 @@ parse_answer (cpp_reader *pfile, int type, location_t pred_loc, if (!count) { - cpp_error (pfile, CPP_DL_ERROR, "predicate's answer is empty"); + cpp_error (pfile, CPP_DL_ERROR, "predicate%'s answer is empty"); return false; } @@ -2955,7 +2962,7 @@ do_assert (cpp_reader *pfile) is not a duplicate. */ if (*find_answer (node, answer)) { - cpp_error (pfile, CPP_DL_WARNING, "\"%s\" re-asserted", + cpp_error (pfile, CPP_DL_WARNING, "%qs re-asserted", NODE_NAME (node) + 1); return; } @@ -3038,10 +3045,10 @@ cpp_define (cpp_reader *pfile, const char *str) void cpp_define_unused (cpp_reader *pfile, const char *str) { - unsigned char warn_unused_macros = CPP_OPTION (pfile, warn_unused_macros); - CPP_OPTION (pfile, warn_unused_macros) = 0; - cpp_define (pfile, str); - CPP_OPTION (pfile, warn_unused_macros) = warn_unused_macros; + unsigned char warn_unused_macros = CPP_OPTION (pfile, warn_unused_macros); + CPP_OPTION (pfile, warn_unused_macros) = 0; + cpp_define (pfile, str); + CPP_OPTION (pfile, warn_unused_macros) = warn_unused_macros; } /* Use to build macros to be run through cpp_define() as diff --git a/libcpp/errors.cc b/libcpp/errors.cc index 295496d..5d8ceb9 100644 --- a/libcpp/errors.cc +++ b/libcpp/errors.cc @@ -54,7 +54,7 @@ cpp_diagnostic_get_current_location (cpp_reader *pfile) /* Print a diagnostic at the given location. */ -ATTRIBUTE_FPTR_PRINTF(5,0) +ATTRIBUTE_CPP_PPDIAG (5, 0) static bool cpp_diagnostic_at (cpp_reader * pfile, enum cpp_diagnostic_level level, enum cpp_warning_reason reason, rich_location *richloc, @@ -71,7 +71,7 @@ cpp_diagnostic_at (cpp_reader * pfile, enum cpp_diagnostic_level level, /* Print a diagnostic at the location of the previously lexed token. */ -ATTRIBUTE_FPTR_PRINTF(4,0) +ATTRIBUTE_CPP_PPDIAG (4, 0) static bool cpp_diagnostic (cpp_reader * pfile, enum cpp_diagnostic_level level, enum cpp_warning_reason reason, @@ -190,7 +190,7 @@ cpp_pedwarning_at (cpp_reader * pfile, enum cpp_warning_reason reason, /* Print a diagnostic at a specific location. */ -ATTRIBUTE_FPTR_PRINTF(6,0) +ATTRIBUTE_CPP_PPDIAG (6, 0) static bool cpp_diagnostic_with_line (cpp_reader * pfile, enum cpp_diagnostic_level level, enum cpp_warning_reason reason, diff --git a/libcpp/expr.cc b/libcpp/expr.cc index 089bf3e..b7772c9 100644 --- a/libcpp/expr.cc +++ b/libcpp/expr.cc @@ -678,10 +678,12 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, { if (radix == 2) SYNTAX_ERROR2_AT (virtual_location, - "invalid digit \"%c\" in binary constant", '0' + max_digit); + "invalid digit %<%c%> in binary constant", + '0' + max_digit); else SYNTAX_ERROR2_AT (virtual_location, - "invalid digit \"%c\" in octal constant", '0' + max_digit); + "invalid digit %<%c%> in octal constant", + '0' + max_digit); } if (float_flag != NOT_FLOAT) @@ -689,7 +691,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, if (radix == 2) { cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0, - "invalid prefix \"0b\" for floating constant"); + "invalid prefix %<0b%> for floating constant"); return CPP_N_INVALID; } @@ -751,8 +753,8 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, else { cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0, - "invalid suffix \"%.*s\" on floating constant", - (int) (limit - str), str); + "invalid suffix %<%.*s%> on floating " + "constant", (int) (limit - str), str); return CPP_N_INVALID; } } @@ -762,7 +764,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, && CPP_WTRADITIONAL (pfile) && ! cpp_sys_macro_p (pfile)) cpp_warning_with_line (pfile, CPP_W_TRADITIONAL, virtual_location, 0, - "traditional C rejects the \"%.*s\" suffix", + "traditional C rejects the %<%.*s%> suffix", (int) (limit - str), str); /* A suffix for double is a GCC extension via decimal float support. @@ -777,8 +779,8 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, if ((result & CPP_N_DFLOAT) && radix != 10) { cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0, - "invalid suffix \"%.*s\" with hexadecimal floating constant", - (int) (limit - str), str); + "invalid suffix %<%.*s%> with hexadecimal " + "floating constant", (int) (limit - str), str); return CPP_N_INVALID; } @@ -791,11 +793,12 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, if (!CPP_OPTION (pfile, dfp_constants)) cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC, virtual_location, 0, - "decimal float constants are a C23 feature"); + "decimal floating constants are a C23 feature"); else if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0) cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT, virtual_location, 0, - "decimal float constants are a C23 feature"); + "decimal floating constants are a C23 " + "feature"); } result |= CPP_N_FLOATING; @@ -814,8 +817,8 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, else { cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0, - "invalid suffix \"%.*s\" on integer constant", - (int) (limit - str), str); + "invalid suffix %<%.*s%> on integer " + "constant", (int) (limit - str), str); return CPP_N_INVALID; } } @@ -831,7 +834,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, if (u_or_i || large) cpp_warning_with_line (pfile, large ? CPP_W_LONG_LONG : CPP_W_TRADITIONAL, virtual_location, 0, - "traditional C rejects the \"%.*s\" suffix", + "traditional C rejects the %<%.*s%> suffix", (int) (limit - str), str); } @@ -853,9 +856,10 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T && !CPP_OPTION (pfile, size_t_literals)) { - const char *message = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED - ? N_("use of C++23 %<size_t%> integer constant") - : N_("use of C++23 %<make_signed_t<size_t>%> integer constant"); + const char *message + = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED + ? N_("use of C++23 %<size_t%> integer constant") + : N_("use of C++23 %<make_signed_t<size_t>%> integer constant"); cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS, virtual_location, 0, message); } @@ -1118,7 +1122,7 @@ parse_defined (cpp_reader *pfile) cpp_context *initial_context = pfile->context; if (pfile->state.in_directive == 3) - cpp_error (pfile, CPP_DL_ERROR, "'defined' in #embed parameter"); + cpp_error (pfile, CPP_DL_ERROR, "%<defined%> in %<#embed%> parameter"); /* Don't expand macros. */ pfile->state.prevent_expansion++; @@ -1135,14 +1139,14 @@ parse_defined (cpp_reader *pfile) node = token->val.node.node; if (paren && cpp_get_token (pfile)->type != CPP_CLOSE_PAREN) { - cpp_error (pfile, CPP_DL_ERROR, "missing ')' after \"defined\""); + cpp_error (pfile, CPP_DL_ERROR, "missing %<)%> after %<defined%>"); node = 0; } } else { cpp_error (pfile, CPP_DL_ERROR, - "operator \"defined\" requires an identifier"); + "operator %<defined%> requires an identifier"); if (token->flags & NAMED_OP) { cpp_token op; @@ -1150,7 +1154,7 @@ parse_defined (cpp_reader *pfile) op.flags = 0; op.type = token->type; cpp_error (pfile, CPP_DL_ERROR, - "(\"%s\" is an alternative token for \"%s\" in C++)", + "(%qs is an alternative token for %qs in C++)", cpp_token_as_text (pfile, token), cpp_token_as_text (pfile, &op)); } @@ -1163,7 +1167,7 @@ parse_defined (cpp_reader *pfile) || initial_context != &pfile->base_context) && CPP_OPTION (pfile, warn_expansion_to_defined)) cpp_pedwarning (pfile, CPP_W_EXPANSION_TO_DEFINED, - "this use of \"defined\" may not be portable"); + "this use of %<defined%> may not be portable"); is_defined = _cpp_defined_macro_p (node); if (!_cpp_maybe_notify_macro_use (pfile, node, token->src_loc)) /* It wasn't a macro after all. */ @@ -1268,7 +1272,7 @@ eval_token (cpp_reader *pfile, const cpp_token *token, result.low = 0; if (CPP_OPTION (pfile, warn_undef) && !pfile->state.skip_eval) cpp_warning_with_line (pfile, CPP_W_UNDEF, virtual_location, 0, - "\"%s\" is not defined, evaluates to 0", + "%qs is not defined, evaluates to %<0%>", NODE_NAME (token->val.node.node)); } break; @@ -1431,7 +1435,7 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, case CPP_HASH: if (!want_value) SYNTAX_ERROR2_AT (op.loc, - "missing binary operator before token \"%s\"", + "missing binary operator before token %qs", cpp_token_as_text (pfile, op.token)); want_value = false; top->value = eval_token (pfile, op.token, op.loc); @@ -1456,7 +1460,8 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, default: if ((int) op.op <= (int) CPP_EQ || (int) op.op >= (int) CPP_PLUS_EQ) SYNTAX_ERROR2_AT (op.loc, - "token \"%s\" is not valid in preprocessor expressions", + "token %qs is not valid in preprocessor " + "expressions", cpp_token_as_text (pfile, op.token)); break; } @@ -1466,7 +1471,7 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, { if (!want_value) SYNTAX_ERROR2_AT (op.loc, - "missing binary operator before token \"%s\"", + "missing binary operator before token %qs", cpp_token_as_text (pfile, op.token)); } else if (want_value) @@ -1475,7 +1480,7 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, Try to emit a specific diagnostic. */ if (op.op == CPP_CLOSE_PAREN && top->op == CPP_OPEN_PAREN) SYNTAX_ERROR_AT (op.loc, - "missing expression between '(' and ')'"); + "missing expression between %<(%> and %<)%>"); if (op.op == CPP_EOF && top->op == CPP_EOF) SYNTAX_ERROR2_AT (op.loc, @@ -1483,13 +1488,13 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, if (top->op != CPP_EOF && top->op != CPP_OPEN_PAREN) SYNTAX_ERROR2_AT (op.loc, - "operator '%s' has no right operand", + "operator %qs has no right operand", cpp_token_as_text (pfile, top->token)); else if (op.op == CPP_CLOSE_PAREN || op.op == CPP_EOF) /* Complain about missing paren during reduction. */; else SYNTAX_ERROR2_AT (op.loc, - "operator '%s' has no left operand", + "operator %qs has no left operand", cpp_token_as_text (pfile, op.token)); } @@ -1518,7 +1523,7 @@ _cpp_parse_expr (cpp_reader *pfile, const char *dir, case CPP_COLON: if (top->op != CPP_QUERY) SYNTAX_ERROR_AT (op.loc, - " ':' without preceding '?'"); + " %<:%> without preceding %<?%>"); if (!num_zerop (top[-1].value)) /* Was '?' condition true? */ pfile->state.skip_eval++; else @@ -1687,7 +1692,7 @@ reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op) { cpp_error_with_line (pfile, CPP_DL_ERROR, top->token->src_loc, - 0, "missing ')' in expression"); + 0, "missing %<)%> in expression"); return 0; } top--; @@ -1716,7 +1721,7 @@ reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op) /* COMMA and COLON should not reduce a QUERY operator. */ if (op == CPP_COMMA || op == CPP_COLON) return top; - cpp_error (pfile, CPP_DL_ERROR, "'?' without following ':'"); + cpp_error (pfile, CPP_DL_ERROR, "%<?%> without following %<:%>"); return 0; default: @@ -1731,7 +1736,7 @@ reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op) if (op == CPP_CLOSE_PAREN) { - cpp_error (pfile, CPP_DL_ERROR, "missing '(' in expression"); + cpp_error (pfile, CPP_DL_ERROR, "missing %<(%> in expression"); return 0; } @@ -1763,12 +1768,12 @@ check_promotion (cpp_reader *pfile, const struct op *op) { if (!num_positive (op[-1].value, CPP_OPTION (pfile, precision))) cpp_error_with_line (pfile, CPP_DL_WARNING, op[-1].loc, 0, - "the left operand of \"%s\" changes sign when promoted", - cpp_token_as_text (pfile, op->token)); + "the left operand of %qs changes sign when " + "promoted", cpp_token_as_text (pfile, op->token)); } else if (!num_positive (op->value, CPP_OPTION (pfile, precision))) cpp_error_with_line (pfile, CPP_DL_WARNING, op->loc, 0, - "the right operand of \"%s\" changes sign when promoted", + "the right operand of %qs changes sign when promoted", cpp_token_as_text (pfile, op->token)); } diff --git a/libcpp/files.cc b/libcpp/files.cc index 5f9fbc5..8f9a5a4 100644 --- a/libcpp/files.cc +++ b/libcpp/files.cc @@ -530,7 +530,7 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, /* Ensure we get no confusion between cached files and directories. */ if (start_dir == NULL) - cpp_error_at (pfile, CPP_DL_ICE, loc, "NULL directory in find_file"); + cpp_error_at (pfile, CPP_DL_ICE, loc, "NULL directory in %<find_file%>"); void **hash_slot = htab_find_slot_with_hash (pfile->file_hash, fname, @@ -607,7 +607,7 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, " but they were invalid"); if (!cpp_get_options (pfile)->warn_invalid_pch) cpp_error (pfile, CPP_DL_NOTE, - "use -Winvalid-pch for more information"); + "use %<-Winvalid-pch%> for more information"); } if (kind == _cpp_FFK_PRE_INCLUDE) @@ -1415,7 +1415,8 @@ finish_base64_embed (cpp_reader *pfile, const char *fname, bool angle, { if (!params->has_embed) cpp_error_at (pfile, CPP_DL_ERROR, params->loc, - "'gnu::base64' parameter can be only used with \".\""); + "%<gnu::base64%> parameter can be only used with " + "%<\".\"%>"); return 0; } tokenrun *cur_run = ¶ms->base64.base_run; @@ -1431,7 +1432,7 @@ finish_base64_embed (cpp_reader *pfile, const char *fname, bool angle, { fail: cpp_error_at (pfile, CPP_DL_ERROR, params->loc, - "'gnu::base64' argument not valid base64 " + "%<gnu::base64%> argument not valid base64 " "encoded string"); free (buf); return 0; @@ -2265,11 +2266,11 @@ _cpp_pop_file_buffer (cpp_reader *pfile, _cpp_file *file, if (pfile->cb.get_suggestion (pfile, mi_cmacro, names) && cpp_warning_with_line (pfile, CPP_W_HEADER_GUARD, pfile->mi_loc, 0, - "header guard \"%s\" followed by " - "\"#define\" of a different macro", + "header guard %qs followed by " + "%<#define%> of a different macro", mi_cmacro)) cpp_error_at (pfile, CPP_DL_NOTE, pfile->mi_def_loc, - "\"%s\" is defined here; did you mean \"%s\"?", + "%qs is defined here; did you mean %qs?", mi_def_cmacro, mi_cmacro); } } diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index bff6601..e64c2b6 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -653,6 +653,13 @@ struct cpp_options cpp_main_search main_search : 8; }; +#if GCC_VERSION >= 3005 +#define ATTRIBUTE_CPP_PPDIAG(m, n) \ + __attribute__ ((__format__ (__gcc_diag__, m , n))) ATTRIBUTE_NONNULL(m) +#else +#define ATTRIBUTE_CPP_PPDIAG(m, n) ATTRIBUTE_NONNULL(m) +#endif + /* Diagnostic levels. To get a diagnostic without associating a position in the translation unit with it, use cpp_error_with_line with a line number of zero. */ @@ -760,7 +767,7 @@ struct cpp_callbacks enum cpp_warning_reason, rich_location *, const char *, va_list *) - ATTRIBUTE_FPTR_PRINTF(5,0); + ATTRIBUTE_CPP_PPDIAG (5,0); /* Callbacks for when a macro is expanded, or tested (whether defined or not at the time) in #ifdef, #ifndef or "defined". */ @@ -1357,24 +1364,24 @@ cpp_num cpp_num_sign_extend (cpp_num, size_t); /* Output a diagnostic of some kind. */ extern bool cpp_error (cpp_reader *, enum cpp_diagnostic_level, const char *msgid, ...) - ATTRIBUTE_PRINTF_3; + ATTRIBUTE_CPP_PPDIAG (3, 4); extern bool cpp_warning (cpp_reader *, enum cpp_warning_reason, const char *msgid, ...) - ATTRIBUTE_PRINTF_3; + ATTRIBUTE_CPP_PPDIAG (3, 4); extern bool cpp_pedwarning (cpp_reader *, enum cpp_warning_reason, const char *msgid, ...) - ATTRIBUTE_PRINTF_3; + ATTRIBUTE_CPP_PPDIAG (3, 4); extern bool cpp_warning_syshdr (cpp_reader *, enum cpp_warning_reason reason, const char *msgid, ...) - ATTRIBUTE_PRINTF_3; + ATTRIBUTE_CPP_PPDIAG (3, 4); /* As their counterparts above, but use RICHLOC. */ extern bool cpp_warning_at (cpp_reader *, enum cpp_warning_reason, rich_location *richloc, const char *msgid, ...) - ATTRIBUTE_PRINTF_4; + ATTRIBUTE_CPP_PPDIAG (4, 5); extern bool cpp_pedwarning_at (cpp_reader *, enum cpp_warning_reason, rich_location *richloc, const char *msgid, ...) - ATTRIBUTE_PRINTF_4; + ATTRIBUTE_CPP_PPDIAG (4, 5); /* Output a diagnostic with "MSGID: " preceding the error string of errno. No location is printed. */ @@ -1391,27 +1398,27 @@ extern bool cpp_errno_filename (cpp_reader *, enum cpp_diagnostic_level, extern bool cpp_error_with_line (cpp_reader *, enum cpp_diagnostic_level, location_t, unsigned, const char *msgid, ...) - ATTRIBUTE_PRINTF_5; + ATTRIBUTE_CPP_PPDIAG (5, 6); extern bool cpp_warning_with_line (cpp_reader *, enum cpp_warning_reason, location_t, unsigned, const char *msgid, ...) - ATTRIBUTE_PRINTF_5; + ATTRIBUTE_CPP_PPDIAG (5, 6); extern bool cpp_pedwarning_with_line (cpp_reader *, enum cpp_warning_reason, location_t, unsigned, const char *msgid, ...) - ATTRIBUTE_PRINTF_5; + ATTRIBUTE_CPP_PPDIAG (5, 6); extern bool cpp_warning_with_line_syshdr (cpp_reader *, enum cpp_warning_reason, location_t, unsigned, const char *msgid, ...) - ATTRIBUTE_PRINTF_5; + ATTRIBUTE_CPP_PPDIAG (5, 6); extern bool cpp_error_at (cpp_reader * pfile, enum cpp_diagnostic_level, location_t src_loc, const char *msgid, ...) - ATTRIBUTE_PRINTF_4; + ATTRIBUTE_CPP_PPDIAG (4, 5); extern bool cpp_error_at (cpp_reader * pfile, enum cpp_diagnostic_level, rich_location *richloc, const char *msgid, ...) - ATTRIBUTE_PRINTF_4; + ATTRIBUTE_CPP_PPDIAG (4, 5); /* In lex.cc */ extern int cpp_ideq (const cpp_token *, const char *); diff --git a/libcpp/init.cc b/libcpp/init.cc index 3e4a2bc..1cc62a4 100644 --- a/libcpp/init.cc +++ b/libcpp/init.cc @@ -663,7 +663,7 @@ static void sanity_checks (cpp_reader *pfile) type precisions made by cpplib. */ test--; if (test < 1) - cpp_error (pfile, CPP_DL_ICE, "cppchar_t must be an unsigned type"); + cpp_error (pfile, CPP_DL_ICE, "%<cppchar_t%> must be an unsigned type"); if (CPP_OPTION (pfile, precision) > max_precision) cpp_error (pfile, CPP_DL_ICE, @@ -674,18 +674,19 @@ static void sanity_checks (cpp_reader *pfile) if (CPP_OPTION (pfile, precision) < CPP_OPTION (pfile, int_precision)) cpp_error (pfile, CPP_DL_ICE, - "CPP arithmetic must be at least as precise as a target int"); + "CPP arithmetic must be at least as precise as a target " + "%<int%>"); if (CPP_OPTION (pfile, char_precision) < 8) - cpp_error (pfile, CPP_DL_ICE, "target char is less than 8 bits wide"); + cpp_error (pfile, CPP_DL_ICE, "target %<char%> is less than 8 bits wide"); if (CPP_OPTION (pfile, wchar_precision) < CPP_OPTION (pfile, char_precision)) cpp_error (pfile, CPP_DL_ICE, - "target wchar_t is narrower than target char"); + "target %<wchar_t%> is narrower than target %<char%>"); if (CPP_OPTION (pfile, int_precision) < CPP_OPTION (pfile, char_precision)) cpp_error (pfile, CPP_DL_ICE, - "target int is narrower than target char"); + "target %<int%> is narrower than target %<char%>"); /* This is assumed in eval_token() and could be fixed if necessary. */ if (sizeof (cppchar_t) > sizeof (cpp_num_part)) diff --git a/libcpp/lex.cc b/libcpp/lex.cc index 4025e5c..66ff6ce 100644 --- a/libcpp/lex.cc +++ b/libcpp/lex.cc @@ -1036,7 +1036,7 @@ _cpp_process_line_notes (cpp_reader *pfile, int in_comment) if (CPP_OPTION (pfile, trigraphs)) cpp_warning_with_line (pfile, CPP_W_TRIGRAPHS, pfile->line_table->highest_line, col, - "trigraph ??%c converted to %c", + "trigraph %<??%c%> converted to %<%c%>", note->type, (int) _cpp_trigraph_map[note->type]); else @@ -1044,7 +1044,7 @@ _cpp_process_line_notes (cpp_reader *pfile, int in_comment) cpp_warning_with_line (pfile, CPP_W_TRIGRAPHS, pfile->line_table->highest_line, col, - "trigraph ??%c ignored, use -trigraphs to enable", + "trigraph %<??%c%> ignored, use %<-trigraphs%> to enable", note->type); } } @@ -1577,7 +1577,7 @@ maybe_warn_bidi_on_char (cpp_reader *pfile, bidi::kind kind, rich_loc.add_range (bidi::current_ctx_loc ()); cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, "UTF-8 vs UCN mismatch when closing " - "a context by \"%s\"", bidi::to_str (kind)); + "a context by %qs", bidi::to_str (kind)); } } else if (warn_bidi & bidirectional_any @@ -1585,11 +1585,11 @@ maybe_warn_bidi_on_char (cpp_reader *pfile, bidi::kind kind, { if (kind == bidi::kind::PDF || kind == bidi::kind::PDI) cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, - "\"%s\" is closing an unopened context", + "%qs is closing an unopened context", bidi::to_str (kind)); else cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, - "found problematic Unicode character \"%s\"", + "found problematic Unicode character %qs", bidi::to_str (kind)); } } @@ -1619,13 +1619,13 @@ _cpp_warn_invalid_utf8 (cpp_reader *pfile) cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x>", + "invalid UTF-8 character %<<%x>%>", cur[0]); else cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x>", + "invalid UTF-8 character %<<%x>%>", cur[0]); return cur + 1; } @@ -1635,13 +1635,13 @@ _cpp_warn_invalid_utf8 (cpp_reader *pfile) cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x>", + "invalid UTF-8 character %<<%x><%x>%>", cur[0], cur[1]); else cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x>", + "invalid UTF-8 character %<<%x><%x>%>", cur[0], cur[1]); return cur + 2; } @@ -1651,13 +1651,13 @@ _cpp_warn_invalid_utf8 (cpp_reader *pfile) cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x><%x>", + "invalid UTF-8 character %<<%x><%x><%x>%>", cur[0], cur[1], cur[2]); else cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x><%x>", + "invalid UTF-8 character %<<%x><%x><%x>%>", cur[0], cur[1], cur[2]); return cur + 3; } @@ -1667,13 +1667,13 @@ _cpp_warn_invalid_utf8 (cpp_reader *pfile) cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x><%x><%x>", + "invalid UTF-8 character %<<%x><%x><%x><%x>%>", cur[0], cur[1], cur[2], cur[3]); else cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "invalid UTF-8 character <%x><%x><%x><%x>", + "invalid UTF-8 character %<<%x><%x><%x><%x>%>", cur[0], cur[1], cur[2], cur[3]); return cur + 4; } @@ -1755,7 +1755,7 @@ _cpp_skip_block_comment (cpp_reader *pfile) cpp_warning_with_line (pfile, CPP_W_COMMENTS, pfile->line_table->highest_line, CPP_BUF_COL (buffer), - "\"/*\" within comment"); + "%</*%> within comment"); } } else if (c == '\n') @@ -1933,13 +1933,13 @@ warn_about_normalization (cpp_reader *pfile, sz = cpp_spell_token (pfile, token, buf, false) - buf; if (NORMALIZE_STATE_RESULT (s) == normalized_C) cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc, - "`%.*s' is not in NFKC", (int) sz, buf); + "%<%.*s%> is not in NFKC", (int) sz, buf); else if (identifier && CPP_OPTION (pfile, xid_identifiers)) cpp_pedwarning_at (pfile, CPP_W_NORMALIZE, &rich_loc, - "`%.*s' is not in NFC", (int) sz, buf); + "%<%.*s%> is not in NFC", (int) sz, buf); else cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc, - "`%.*s' is not in NFC", (int) sz, buf); + "%<%.*s%> is not in NFC", (int) sz, buf); free (buf); } } @@ -1966,7 +1966,7 @@ forms_identifier_p (cpp_reader *pfile, int first, if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) { CPP_OPTION (pfile, warn_dollars) = 0; - cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number"); + cpp_error (pfile, CPP_DL_PEDWARN, "%<$%> in identifier or number"); } return true; @@ -2028,10 +2028,10 @@ maybe_va_opt_error (cpp_reader *pfile) { if (CPP_OPTION (pfile, cplusplus)) cpp_pedwarning (pfile, CPP_W_CXX20_EXTENSIONS, - "__VA_OPT__ is not available until C++20"); + "%<__VA_OPT__%> is not available until C++20"); else cpp_pedwarning (pfile, CPP_W_PEDANTIC, - "__VA_OPT__ is not available until C23"); + "%<__VA_OPT__%> is not available until C23"); } } else if (!pfile->state.va_args_ok) @@ -2039,7 +2039,7 @@ maybe_va_opt_error (cpp_reader *pfile) /* __VA_OPT__ should only appear in the replacement list of a variadic macro. */ cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_OPT__ can only appear in the expansion" + "%<__VA_OPT__%> can only appear in the expansion" " of a C++20 variadic macro"); } } @@ -2056,7 +2056,7 @@ identifier_diagnostics_on_lex (cpp_reader *pfile, cpp_hashnode *node) /* It is allowed to poison the same identifier twice. */ if ((node->flags & NODE_POISONED) && !pfile->state.poisoned_ok) { - cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned \"%s\"", + cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned %qs", NODE_NAME (node)); const auto data = (cpp_hashnode_extra *) ht_lookup (pfile->extra_hash_table, node->ident, HT_NO_INSERT); @@ -2071,11 +2071,11 @@ identifier_diagnostics_on_lex (cpp_reader *pfile, cpp_hashnode *node) { if (CPP_OPTION (pfile, cplusplus)) cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_ARGS__ can only appear in the expansion" + "%<__VA_ARGS__%> can only appear in the expansion" " of a C++11 variadic macro"); else cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_ARGS__ can only appear in the expansion" + "%<__VA_ARGS__%> can only appear in the expansion" " of a C99 variadic macro"); } @@ -2087,7 +2087,7 @@ identifier_diagnostics_on_lex (cpp_reader *pfile, cpp_hashnode *node) /* For -Wc++-compat, warn about use of C++ named operators. */ if (node->flags & NODE_WARN_OPERATOR) cpp_warning (pfile, CPP_W_CXX_OPERATOR_NAMES, - "identifier \"%s\" is a special operator name in C++", + "identifier %qs is a special operator name in C++", NODE_NAME (node)); } @@ -3485,7 +3485,7 @@ cpp_maybe_module_directive (cpp_reader *pfile, cpp_token *result) && _cpp_maybe_notify_macro_use (pfile, node, tok->src_loc) && !cpp_fun_like_macro_p (node)) cpp_error_with_line (pfile, CPP_DL_ERROR, tok->src_loc, 0, - "module control-line \"%s\" cannot be" + "module control-line %qs cannot be" " an object-like macro", NODE_NAME (node)); } diff --git a/libcpp/macro.cc b/libcpp/macro.cc index 2fb3861..f0dfc79 100644 --- a/libcpp/macro.cc +++ b/libcpp/macro.cc @@ -141,7 +141,7 @@ class vaopt_state { if (m_state > 0) { cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc, - "__VA_OPT__ may not appear in a __VA_OPT__"); + "%<__VA_OPT__%> may not appear in a %<__VA_OPT__%>"); return ERROR; } ++m_state; @@ -154,7 +154,7 @@ class vaopt_state { if (token->type != CPP_OPEN_PAREN) { cpp_error_at (m_pfile, CPP_DL_ERROR, m_location, - "__VA_OPT__ must be followed by an " + "%<__VA_OPT__%> must be followed by an " "open parenthesis"); return ERROR; } @@ -232,7 +232,7 @@ class vaopt_state { { if (m_variadic && m_state != 0) cpp_error_at (m_pfile, CPP_DL_ERROR, m_location, - "unterminated __VA_OPT__"); + "unterminated %<__VA_OPT__%>"); return m_state == 0; } @@ -393,7 +393,7 @@ builtin_has_include_1 (cpp_reader *pfile, const char *name, bool *paren, { if (!pfile->state.in_directive) cpp_error (pfile, CPP_DL_ERROR, - "\"%s\" used outside of preprocessing directive", name); + "%qs used outside of preprocessing directive", name); pfile->state.angled_headers = true; const auto sav_padding = pfile->state.directive_wants_padding; @@ -404,7 +404,7 @@ builtin_has_include_1 (cpp_reader *pfile, const char *name, bool *paren, token = _cpp_get_token_no_padding (pfile); else cpp_error (pfile, CPP_DL_ERROR, - "missing '(' before \"%s\" operand", name); + "missing %<(%> before %qs operand", name); pfile->state.angled_headers = false; pfile->state.directive_wants_padding = sav_padding; @@ -422,7 +422,7 @@ builtin_has_include_1 (cpp_reader *pfile, const char *name, bool *paren, fname = _cpp_bracket_include (pfile); else cpp_error (pfile, CPP_DL_ERROR, - "operator \"%s\" requires a header-name", name); + "operator %qs requires a header-name", name); return fname; } @@ -451,7 +451,7 @@ builtin_has_include (cpp_reader *pfile, cpp_hashnode *op, bool has_next) if (paren && _cpp_get_token_no_padding (pfile)->type != CPP_CLOSE_PAREN) cpp_error (pfile, CPP_DL_ERROR, - "missing ')' after \"%s\" operand", NODE_NAME (op)); + "missing %<)%> after %qs operand", NODE_NAME (op)); return result; } @@ -496,7 +496,7 @@ builtin_has_embed (cpp_reader *pfile) if (!*fname) { cpp_error_with_line (pfile, CPP_DL_ERROR, params.loc, 0, - "empty filename in '%s'", "__has_embed"); + "empty filename in %qs", "__has_embed"); ok = false; } @@ -530,7 +530,7 @@ _cpp_warn_if_unused_macro (cpp_reader *pfile, cpp_hashnode *node, (linemap_lookup (pfile->line_table, macro->line)))) cpp_warning_with_line (pfile, CPP_W_UNUSED_MACROS, macro->line, 0, - "macro \"%s\" is not used", NODE_NAME (node)); + "macro %qs is not used", NODE_NAME (node)); } return 1; @@ -569,14 +569,14 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, switch (node->value.builtin) { default: - cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro \"%s\"", + cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro %qs", NODE_NAME (node)); break; case BT_TIMESTAMP: { if (CPP_OPTION (pfile, warn_date_time)) - cpp_warning (pfile, CPP_W_DATE_TIME, "macro \"%s\" might prevent " + cpp_warning (pfile, CPP_W_DATE_TIME, "macro %qs might prevent " "reproducible builds", NODE_NAME (node)); cpp_buffer *pbuffer = cpp_get_buffer (pfile); @@ -684,7 +684,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, case BT_DATE: case BT_TIME: if (CPP_OPTION (pfile, warn_date_time)) - cpp_warning (pfile, CPP_W_DATE_TIME, "macro \"%s\" might prevent " + cpp_warning (pfile, CPP_W_DATE_TIME, "macro %qs might prevent " "reproducible builds", NODE_NAME (node)); if (pfile->date == NULL) { @@ -730,7 +730,8 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, case BT_COUNTER: if (CPP_OPTION (pfile, directives_only) && pfile->state.in_directive) cpp_error (pfile, CPP_DL_ERROR, - "__COUNTER__ expanded inside directive with -fdirectives-only"); + "%<__COUNTER__%> expanded inside directive with " + "%<-fdirectives-only%>"); number = pfile->counter++; break; @@ -756,7 +757,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node, if (CPP_OPTION (pfile, traditional)) { cpp_error (pfile, CPP_DL_ERROR, /* FIXME should be DL_SORRY */ - "'__has_embed' not supported in traditional C"); + "%<__has_embed%> not supported in traditional C"); break; } number = builtin_has_embed (pfile); @@ -884,7 +885,7 @@ builtin_macro (cpp_reader *pfile, cpp_hashnode *node, else _cpp_push_token_context (pfile, NULL, token, 1); if (pfile->buffer->cur != pfile->buffer->rlimit) - cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro \"%s\"", + cpp_error (pfile, CPP_DL_ICE, "invalid built-in macro %qs", NODE_NAME (node)); _cpp_pop_buffer (pfile); @@ -1003,7 +1004,7 @@ stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned int count) if (backslash_count & 1) { cpp_error (pfile, CPP_DL_WARNING, - "invalid string literal, ignoring final '\\'"); + "invalid string literal, ignoring final %<\\%>"); dest--; } @@ -1200,26 +1201,26 @@ _cpp_arguments_ok (cpp_reader *pfile, cpp_macro *macro, const cpp_hashnode *node if (CPP_OPTION (pfile, cplusplus)) cpp_pedwarning (pfile, CPP_W_CXX20_EXTENSIONS, "ISO C++11 requires at least one argument " - "for the \"...\" in a variadic macro"); + "for the %<...%> in a variadic macro"); else cpp_pedwarning (pfile, CPP_W_PEDANTIC, "ISO C99 requires at least one argument " - "for the \"...\" in a variadic macro"); + "for the %<...%> in a variadic macro"); } return true; } cpp_error (pfile, CPP_DL_ERROR, - "macro \"%s\" requires %u arguments, but only %u given", + "macro %qs requires %u arguments, but only %u given", NODE_NAME (node), macro->paramc, argc); } else cpp_error (pfile, CPP_DL_ERROR, - "macro \"%s\" passed %u arguments, but takes just %u", + "macro %qs passed %u arguments, but takes just %u", NODE_NAME (node), argc, macro->paramc); if (macro->line > RESERVED_LOCATION_COUNT) - cpp_error_at (pfile, CPP_DL_NOTE, macro->line, "macro \"%s\" defined here", + cpp_error_at (pfile, CPP_DL_NOTE, macro->line, "macro %qs defined here", NODE_NAME (node)); return false; @@ -1413,7 +1414,7 @@ collect_args (cpp_reader *pfile, const cpp_hashnode *node, if (token == &pfile->endarg) _cpp_backup_tokens (pfile, 1); cpp_error (pfile, CPP_DL_ERROR, - "unterminated argument list invoking macro \"%s\"", + "unterminated argument list invoking macro %qs", NODE_NAME (node)); } else @@ -1559,8 +1560,8 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node, { if (CPP_WTRADITIONAL (pfile) && ! node->value.macro->syshdr) cpp_warning (pfile, CPP_W_TRADITIONAL, - "function-like macro \"%s\" must be used with arguments in traditional C", - NODE_NAME (node)); + "function-like macro %qs must be used with " + "arguments in traditional C", NODE_NAME (node)); if (pragma_buff) _cpp_release_buff (pfile, pragma_buff); @@ -3462,7 +3463,7 @@ _cpp_save_parameter (cpp_reader *pfile, unsigned n, cpp_hashnode *node, /* Constraint 6.10.3.6 - duplicate parameter names. */ if (node->type == NT_MACRO_ARG) { - cpp_error (pfile, CPP_DL_ERROR, "duplicate macro parameter \"%s\"", + cpp_error (pfile, CPP_DL_ERROR, "duplicate macro parameter %qs", NODE_NAME (node)); return false; } @@ -3544,11 +3545,11 @@ parse_params (cpp_reader *pfile, unsigned *n_ptr, bool *variadic_ptr) { const char *const msgs[5] = { - N_("expected parameter name, found \"%s\""), - N_("expected ',' or ')', found \"%s\""), + N_("expected parameter name, found %qs"), + N_("expected %<,%> or %<)%>, found %qs"), N_("expected parameter name before end of line"), - N_("expected ')' before end of line"), - N_("expected ')' after \"...\"") + N_("expected %<)%> before end of line"), + N_("expected %<)%> after %<...%>") }; unsigned ix = prev_ident; const unsigned char *as_text = NULL; @@ -3663,7 +3664,7 @@ create_iso_definition (cpp_reader *pfile) { bool following_paste_op = false; const char *paste_op_error_msg = - N_("'##' cannot appear at either end of a macro expansion"); + N_("%<##%> cannot appear at either end of a macro expansion"); unsigned int num_extra_tokens = 0; unsigned nparms = 0; cpp_hashnode **params = NULL; @@ -3779,7 +3780,7 @@ create_iso_definition (cpp_reader *pfile) else if (CPP_OPTION (pfile, lang) != CLK_ASM) { cpp_error (pfile, CPP_DL_ERROR, - "'#' is not followed by a macro parameter"); + "%<#%> is not followed by a macro parameter"); goto out; } } @@ -3940,15 +3941,14 @@ _cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node, = (cpp_builtin_macro_p (node) && !(node->flags & NODE_WARN)) ? CPP_W_BUILTIN_MACRO_REDEFINED : CPP_W_NONE; - bool warned = - cpp_pedwarning_with_line (pfile, reason, - macro->line, 0, - "\"%s\" redefined", NODE_NAME (node)); + bool warned + = cpp_pedwarning_with_line (pfile, reason, macro->line, 0, + "%qs redefined", NODE_NAME (node)); if (warned && cpp_user_macro_p (node)) - cpp_error_with_line (pfile, CPP_DL_NOTE, - node->value.macro->line, 0, - "this is the location of the previous definition"); + cpp_error_with_line (pfile, CPP_DL_NOTE, node->value.macro->line, + 0, "this is the location of the previous " + "definition"); } _cpp_free_definition (node); } @@ -4085,8 +4085,8 @@ check_trad_stringification (cpp_reader *pfile, const cpp_macro *macro, && !memcmp (p, NODE_NAME (node), len)) { cpp_warning (pfile, CPP_W_TRADITIONAL, - "macro argument \"%s\" would be stringified in traditional C", - NODE_NAME (node)); + "macro argument %qs would be stringified in " + "traditional C", NODE_NAME (node)); break; } } diff --git a/libcpp/pch.cc b/libcpp/pch.cc index f2f74ed..0989fb3 100644 --- a/libcpp/pch.cc +++ b/libcpp/pch.cc @@ -613,7 +613,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) { if (CPP_OPTION (r, warn_invalid_pch)) cpp_warning_syshdr (r, CPP_W_INVALID_PCH, - "%s: not used because `%.*s' is poisoned", + "%s: not used because %<%.*s%> is poisoned", name, m.name_length, namebuf); goto fail; } @@ -635,7 +635,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) if (CPP_OPTION (r, warn_invalid_pch)) cpp_warning_syshdr (r, CPP_W_INVALID_PCH, - "%s: not used because `%.*s' not defined", + "%s: not used because %<%.*s%> not defined", name, m.name_length, namebuf); goto fail; } @@ -647,10 +647,12 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) { if (CPP_OPTION (r, warn_invalid_pch)) cpp_warning_syshdr (r, CPP_W_INVALID_PCH, - "%s: not used because `%.*s' defined as `%s' not `%.*s'", - name, m.name_length, namebuf, newdefn + m.name_length, - m.definition_length - m.name_length, - namebuf + m.name_length); + "%s: not used because %<%.*s%> defined as " + "%<%s%> not %<%.*s%>", + name, m.name_length, namebuf, + newdefn + m.name_length, + m.definition_length - m.name_length, + namebuf + m.name_length); goto fail; } } @@ -688,7 +690,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) { if (CPP_OPTION (r, warn_invalid_pch)) cpp_warning_syshdr (r, CPP_W_INVALID_PCH, - "%s: not used because `%s' is defined", + "%s: not used because %qs is defined", name, first); goto fail; } @@ -708,7 +710,7 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd) { if (CPP_OPTION (r, warn_invalid_pch)) cpp_warning_syshdr (r, CPP_W_INVALID_PCH, - "%s: not used because `__COUNTER__' is invalid", + "%s: not used because %<__COUNTER__%> is invalid", name); goto fail; } diff --git a/libcpp/traditional.cc b/libcpp/traditional.cc index cf0ef4c..ac01f9d 100644 --- a/libcpp/traditional.cc +++ b/libcpp/traditional.cc @@ -819,7 +819,7 @@ _cpp_scan_out_logical_line (cpp_reader *pfile, cpp_macro *macro, if (lex_state == ls_fun_close) cpp_error_with_line (pfile, CPP_DL_ERROR, fmacro.line, 0, - "unterminated argument list invoking macro \"%s\"", + "unterminated argument list invoking macro %qs", NODE_NAME (fmacro.node)); return result; } @@ -888,7 +888,7 @@ recursive_macro (cpp_reader *pfile, cpp_hashnode *node) if (recursing) cpp_error (pfile, CPP_DL_ERROR, - "detected recursion whilst expanding macro \"%s\"", + "detected recursion whilst expanding macro %qs", NODE_NAME (node)); return recursing; |