]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libcpp, genmatch: Use gcc_diag instead of printf for libcpp diagnostics
authorJakub Jelinek <jakub@redhat.com>
Sat, 12 Oct 2024 08:44:17 +0000 (10:44 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 12 Oct 2024 08:50:41 +0000 (10:50 +0200)
When working on #embed support, or -Wheader-guard or other recent libcpp
changes, I've been annoyed by the libcpp diagnostics being visually
different from normal gcc diagnostics, especially in the area of quoting
stuff in the diagnostic messages.
Normall GCC diagnostics is gcc_diag/gcc_tdiag, one can use
%</%>, %qs etc. in there, while libcpp diagnostics was marked as printf
and in libcpp we've been very creative with quoting stuff, either
no quotes at all, or "something" quoting, or 'something' quoting, or
`something' quoting (but in none of the cases it used colors consistently
with the rest of the compiler).

Now, libcpp diagnostics is always emitted using a callback,
pfile->cb.diagnostic.  On the gcc/ side, this callback is initialized with
genmatch.cc:  cb->diagnostic = diagnostic_cb;
c-family/c-opts.cc:  cb->diagnostic = c_cpp_diagnostic;
fortran/cpp.cc:  cb->diagnostic = cb_cpp_diagnostic;
where the latter two just use diagnostic_report_diagnostic, so actually
support all the gcc_diag stuff, only the genmatch.cc case didn't.

So, the following patch changes genmatch.cc to use pp_format* instead
of vfprintf so that it supports the gcc_diag formatting (pretty-print.o
unfortunately has various dependencies, so had to link genmatch with
libcommon.a libbacktrace.a and tweak Makefile.in so that there are no
circular dependencies) and marks the libcpp diagnostic routines as
gcc_diag rather than printf.  That change resulted in hundreds of
-Wformat-diag new warnings (most of them useful and resulting IMHO in
better diagnostics), so the rest of the patch is changing the format
strings to make -Wformat-diag happy and adjusting the testsuite for
the differences in how is the diagnostic reformatted.

Dunno if some out of GCC tree projects use libcpp, that case would
make it harder because one couldn't use vfprintf in the diagnostic
callback anymore, but there is always David's libdiagnostic which could
be used for that purpose IMHO.

2024-10-12  Jakub Jelinek  <jakub@redhat.com>

libcpp/
* include/cpplib.h (ATTRIBUTE_CPP_PPDIAG): Define.
(struct cpp_callbacks): Use ATTRIBUTE_CPP_PPDIAG instead of
ATTRIBUTE_FPTR_PRINTF on diagnostic callback.
(cpp_error, cpp_warning, cpp_pedwarning, cpp_warning_syshdr): Use
ATTRIBUTE_CPP_PPDIAG (3, 4) instead of ATTRIBUTE_PRINTF_3.
(cpp_warning_at, cpp_pedwarning_at): Use ATTRIBUTE_CPP_PPDIAG (4, 5)
instead of ATTRIBUTE_PRINTF_4.
(cpp_error_with_line, cpp_warning_with_line, cpp_pedwarning_with_line,
cpp_warning_with_line_syshdr): Use ATTRIBUTE_CPP_PPDIAG (5, 6)
instead of ATTRIBUTE_PRINTF_5.
(cpp_error_at): Use ATTRIBUTE_CPP_PPDIAG (4, 5) instead of
ATTRIBUTE_PRINTF_4.
* Makefile.in (po/$(PACKAGE).pot): Use --language=GCC-source rather
than --language=c.
* errors.cc (cpp_diagnostic_at, cpp_diagnostic,
cpp_diagnostic_with_line): Use ATTRIBUTE_CPP_PPDIAG instead of
-ATTRIBUTE_FPTR_PRINTF.
* charset.cc (cpp_host_to_exec_charset, _cpp_valid_ucn, convert_hex,
convert_oct, convert_escape): Fix up -Wformat-diag warnings.
(cpp_interpret_string_ranges, count_source_chars): Use
ATTRIBUTE_CPP_PPDIAG instead of ATTRIBUTE_FPTR_PRINTF.
(narrow_str_to_charconst): Fix up -Wformat-diag warnings.
* directives.cc (check_eol_1, directive_diagnostics, lex_macro_node,
do_undef, glue_header_name, parse_include, do_include_common,
do_include_next, _cpp_parse_embed_params, do_embed, read_flag,
do_line, do_linemarker, register_pragma_1, do_pragma_once,
do_pragma_push_macro, do_pragma_pop_macro, do_pragma_poison,
do_pragma_system_header, do_pragma_warning_or_error, _cpp_do__Pragma,
do_else, do_elif, do_endif, parse_answer, do_assert,
cpp_define_unused): Likewise.
* expr.cc (cpp_classify_number, parse_defined, eval_token,
_cpp_parse_expr, reduce, check_promotion): Likewise.
* files.cc (_cpp_find_file, finish_base64_embed,
_cpp_pop_file_buffer): Likewise.
* init.cc (sanity_checks): Likewise.
* lex.cc (_cpp_process_line_notes, maybe_warn_bidi_on_char,
_cpp_warn_invalid_utf8, _cpp_skip_block_comment,
warn_about_normalization, forms_identifier_p, maybe_va_opt_error,
identifier_diagnostics_on_lex, cpp_maybe_module_directive): Likewise.
* macro.cc (class vaopt_state, builtin_has_include_1,
builtin_has_include, builtin_has_embed, _cpp_warn_if_unused_macro,
_cpp_builtin_macro_text, builtin_macro, stringify_arg,
_cpp_arguments_ok, collect_args, enter_macro_context,
_cpp_save_parameter, parse_params, create_iso_definition,
_cpp_create_definition, check_trad_stringification): Likewise.
* pch.cc (cpp_valid_state): Likewise.
* traditional.cc (_cpp_scan_out_logical_line, recursive_macro):
Likewise.
gcc/
* Makefile.in (generated_files): Remove {gimple,generic}-match*.
(generated_match_files): New variable.  Add a dependency of
$(filter-out $(OBJS-libcommon),$(ALL_HOST_OBJS)) files on those.
(build/genmatch$(build_exeext)): Depend on and link against
libcommon.a and $(LIBBACKTRACE).
* genmatch.cc: Include pretty-print.h and input.h.
(ggc_internal_cleared_alloc, ggc_free): Remove.
(fatal): New function.
(line_table): Remove.
(linemap_client_expand_location_to_spelling_point): Remove.
(diagnostic_cb): Use gcc_diag rather than printf format.  Use
pp_format_verbatim on a temporary pretty_printer instead of
vfprintf.
(fatal_at, warning_at): Use gcc_diag rather than printf format.
(output_line_directive): Rename location_hash to loc_hash.
(parser::eat_ident, parser::parse_operation, parser::parse_expr,
parser::parse_pattern, parser::finish_match_operand): Fix up
-Wformat-diag warnings.
gcc/c-family/
* c-lex.cc (c_common_has_attribute,
c_common_lex_availability_macro): Fix up -Wformat-diag warnings.
gcc/testsuite/
* c-c++-common/cpp/counter-2.c: Adjust expected diagnostics for
libcpp diagnostic formatting changes.
* c-c++-common/cpp/embed-3.c: Likewise.
* c-c++-common/cpp/embed-4.c: Likewise.
* c-c++-common/cpp/embed-16.c: Likewise.
* c-c++-common/cpp/embed-18.c: Likewise.
* c-c++-common/cpp/eof-2.c: Likewise.
* c-c++-common/cpp/eof-3.c: Likewise.
* c-c++-common/cpp/fmax-include-depth.c: Likewise.
* c-c++-common/cpp/has-builtin.c: Likewise.
* c-c++-common/cpp/line-2.c: Likewise.
* c-c++-common/cpp/line-3.c: Likewise.
* c-c++-common/cpp/macro-arg-count-1.c: Likewise.
* c-c++-common/cpp/macro-arg-count-2.c: Likewise.
* c-c++-common/cpp/macro-ranges.c: Likewise.
* c-c++-common/cpp/named-universal-char-escape-4.c: Likewise.
* c-c++-common/cpp/named-universal-char-escape-5.c: Likewise.
* c-c++-common/cpp/pr88974.c: Likewise.
* c-c++-common/cpp/va-opt-error.c: Likewise.
* c-c++-common/cpp/va-opt-pedantic.c: Likewise.
* c-c++-common/cpp/Wheader-guard-2.c: Likewise.
* c-c++-common/cpp/Wheader-guard-3.c: Likewise.
* c-c++-common/cpp/Winvalid-utf8-1.c: Likewise.
* c-c++-common/cpp/Winvalid-utf8-2.c: Likewise.
* c-c++-common/cpp/Winvalid-utf8-3.c: Likewise.
* c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c:
Likewise.
* c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c:
Likewise.
* c-c++-common/pr68833-3.c: Likewise.
* c-c++-common/raw-string-directive-1.c: Likewise.
* gcc.dg/analyzer/named-constants-Wunused-macros.c: Likewise.
* gcc.dg/binary-constants-4.c: Likewise.
* gcc.dg/builtin-redefine.c: Likewise.
* gcc.dg/cpp/19951025-1.c: Likewise.
* gcc.dg/cpp/c11-warning-1.c: Likewise.
* gcc.dg/cpp/c11-warning-2.c: Likewise.
* gcc.dg/cpp/c11-warning-3.c: Likewise.
* gcc.dg/cpp/c23-elifdef-2.c: Likewise.
* gcc.dg/cpp/c23-warning-2.c: Likewise.
* gcc.dg/cpp/embed-2.c: Likewise.
* gcc.dg/cpp/embed-3.c: Likewise.
* gcc.dg/cpp/embed-4.c: Likewise.
* gcc.dg/cpp/expr.c: Likewise.
* gcc.dg/cpp/gnu11-elifdef-2.c: Likewise.
* gcc.dg/cpp/gnu11-elifdef-3.c: Likewise.
* gcc.dg/cpp/gnu11-elifdef-4.c: Likewise.
* gcc.dg/cpp/gnu11-warning-1.c: Likewise.
* gcc.dg/cpp/gnu11-warning-2.c: Likewise.
* gcc.dg/cpp/gnu11-warning-3.c: Likewise.
* gcc.dg/cpp/gnu23-warning-2.c: Likewise.
* gcc.dg/cpp/include6.c: Likewise.
* gcc.dg/cpp/pr35322.c: Likewise.
* gcc.dg/cpp/tr-warn6.c: Likewise.
* gcc.dg/cpp/undef2.c: Likewise.
* gcc.dg/cpp/warn-comments.c: Likewise.
* gcc.dg/cpp/warn-comments-2.c: Likewise.
* gcc.dg/cpp/warn-comments-3.c: Likewise.
* gcc.dg/cpp/warn-cxx-compat.c: Likewise.
* gcc.dg/cpp/warn-cxx-compat-2.c: Likewise.
* gcc.dg/cpp/warn-deprecated.c: Likewise.
* gcc.dg/cpp/warn-deprecated-2.c: Likewise.
* gcc.dg/cpp/warn-long-long.c: Likewise.
* gcc.dg/cpp/warn-long-long-2.c: Likewise.
* gcc.dg/cpp/warn-normalized-1.c: Likewise.
* gcc.dg/cpp/warn-normalized-2.c: Likewise.
* gcc.dg/cpp/warn-normalized-3.c: Likewise.
* gcc.dg/cpp/warn-normalized-4-bytes.c: Likewise.
* gcc.dg/cpp/warn-normalized-4-unicode.c: Likewise.
* gcc.dg/cpp/warn-redefined.c: Likewise.
* gcc.dg/cpp/warn-redefined-2.c: Likewise.
* gcc.dg/cpp/warn-traditional.c: Likewise.
* gcc.dg/cpp/warn-traditional-2.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-1.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-2.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-3.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-4.c: Likewise.
* gcc.dg/cpp/warn-undef.c: Likewise.
* gcc.dg/cpp/warn-undef-2.c: Likewise.
* gcc.dg/cpp/warn-unused-macros.c: Likewise.
* gcc.dg/cpp/warn-unused-macros-2.c: Likewise.
* gcc.dg/pch/counter-2.c: Likewise.
* g++.dg/cpp0x/udlit-error1.C: Likewise.
* g++.dg/cpp23/named-universal-char-escape1.C: Likewise.
* g++.dg/cpp23/named-universal-char-escape2.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-1.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-2.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-3.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-4.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-5.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-6.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-7.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-8.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-9.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-10.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-11.C: Likewise.
* g++.dg/cpp23/Winvalid-utf8-12.C: Likewise.
* g++.dg/cpp/elifdef-3.C: Likewise.
* g++.dg/cpp/elifdef-5.C: Likewise.
* g++.dg/cpp/elifdef-6.C: Likewise.
* g++.dg/cpp/elifdef-7.C: Likewise.
* g++.dg/cpp/embed-1.C: Likewise.
* g++.dg/cpp/embed-2.C: Likewise.
* g++.dg/cpp/pedantic-errors.C: Likewise.
* g++.dg/cpp/warning-1.C: Likewise.
* g++.dg/cpp/warning-2.C: Likewise.
* g++.dg/ext/bitint1.C: Likewise.
* g++.dg/ext/bitint2.C: Likewise.

120 files changed:
gcc/Makefile.in
gcc/c-family/c-lex.cc
gcc/genmatch.cc
gcc/testsuite/c-c++-common/cpp/Wheader-guard-2.c
gcc/testsuite/c-c++-common/cpp/Wheader-guard-3.c
gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-1.c
gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-2.c
gcc/testsuite/c-c++-common/cpp/Winvalid-utf8-3.c
gcc/testsuite/c-c++-common/cpp/counter-2.c
gcc/testsuite/c-c++-common/cpp/embed-16.c
gcc/testsuite/c-c++-common/cpp/embed-18.c
gcc/testsuite/c-c++-common/cpp/embed-3.c
gcc/testsuite/c-c++-common/cpp/embed-4.c
gcc/testsuite/c-c++-common/cpp/eof-2.c
gcc/testsuite/c-c++-common/cpp/eof-3.c
gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c
gcc/testsuite/c-c++-common/cpp/has-builtin.c
gcc/testsuite/c-c++-common/cpp/line-2.c
gcc/testsuite/c-c++-common/cpp/line-3.c
gcc/testsuite/c-c++-common/cpp/macro-arg-count-1.c
gcc/testsuite/c-c++-common/cpp/macro-arg-count-2.c
gcc/testsuite/c-c++-common/cpp/macro-ranges.c
gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-4.c
gcc/testsuite/c-c++-common/cpp/named-universal-char-escape-5.c
gcc/testsuite/c-c++-common/cpp/pr88974.c
gcc/testsuite/c-c++-common/cpp/va-opt-error.c
gcc/testsuite/c-c++-common/cpp/va-opt-pedantic.c
gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-1.c
gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-bad-utf8-pr109098-3.c
gcc/testsuite/c-c++-common/pr68833-3.c
gcc/testsuite/c-c++-common/raw-string-directive-1.c
gcc/testsuite/g++.dg/cpp/elifdef-3.C
gcc/testsuite/g++.dg/cpp/elifdef-5.C
gcc/testsuite/g++.dg/cpp/elifdef-6.C
gcc/testsuite/g++.dg/cpp/elifdef-7.C
gcc/testsuite/g++.dg/cpp/embed-1.C
gcc/testsuite/g++.dg/cpp/embed-2.C
gcc/testsuite/g++.dg/cpp/pedantic-errors.C
gcc/testsuite/g++.dg/cpp/warning-1.C
gcc/testsuite/g++.dg/cpp/warning-2.C
gcc/testsuite/g++.dg/cpp0x/udlit-error1.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-1.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-10.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-11.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-12.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-2.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-3.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-4.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-5.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-6.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-7.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-8.C
gcc/testsuite/g++.dg/cpp23/Winvalid-utf8-9.C
gcc/testsuite/g++.dg/cpp23/named-universal-char-escape1.C
gcc/testsuite/g++.dg/cpp23/named-universal-char-escape2.C
gcc/testsuite/g++.dg/ext/bitint1.C
gcc/testsuite/g++.dg/ext/bitint2.C
gcc/testsuite/gcc.dg/analyzer/named-constants-Wunused-macros.c
gcc/testsuite/gcc.dg/binary-constants-4.c
gcc/testsuite/gcc.dg/builtin-redefine.c
gcc/testsuite/gcc.dg/cpp/19951025-1.c
gcc/testsuite/gcc.dg/cpp/c11-warning-1.c
gcc/testsuite/gcc.dg/cpp/c11-warning-2.c
gcc/testsuite/gcc.dg/cpp/c11-warning-3.c
gcc/testsuite/gcc.dg/cpp/c23-elifdef-2.c
gcc/testsuite/gcc.dg/cpp/c23-warning-2.c
gcc/testsuite/gcc.dg/cpp/embed-2.c
gcc/testsuite/gcc.dg/cpp/embed-3.c
gcc/testsuite/gcc.dg/cpp/embed-4.c
gcc/testsuite/gcc.dg/cpp/expr.c
gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-2.c
gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-3.c
gcc/testsuite/gcc.dg/cpp/gnu11-elifdef-4.c
gcc/testsuite/gcc.dg/cpp/gnu11-warning-1.c
gcc/testsuite/gcc.dg/cpp/gnu11-warning-2.c
gcc/testsuite/gcc.dg/cpp/gnu11-warning-3.c
gcc/testsuite/gcc.dg/cpp/gnu23-warning-2.c
gcc/testsuite/gcc.dg/cpp/include6.c
gcc/testsuite/gcc.dg/cpp/pr35322.c
gcc/testsuite/gcc.dg/cpp/tr-warn6.c
gcc/testsuite/gcc.dg/cpp/undef2.c
gcc/testsuite/gcc.dg/cpp/warn-comments-2.c
gcc/testsuite/gcc.dg/cpp/warn-comments-3.c
gcc/testsuite/gcc.dg/cpp/warn-comments.c
gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c
gcc/testsuite/gcc.dg/cpp/warn-cxx-compat.c
gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c
gcc/testsuite/gcc.dg/cpp/warn-deprecated.c
gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c
gcc/testsuite/gcc.dg/cpp/warn-long-long.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-1.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-2.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c
gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c
gcc/testsuite/gcc.dg/cpp/warn-redefined.c
gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c
gcc/testsuite/gcc.dg/cpp/warn-traditional.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-1.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-2.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c
gcc/testsuite/gcc.dg/cpp/warn-undef-2.c
gcc/testsuite/gcc.dg/cpp/warn-undef.c
gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c
gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c
gcc/testsuite/gcc.dg/pch/counter-2.c
libcpp/Makefile.in
libcpp/charset.cc
libcpp/directives.cc
libcpp/errors.cc
libcpp/expr.cc
libcpp/files.cc
libcpp/include/cpplib.h
libcpp/init.cc
libcpp/lex.cc
libcpp/macro.cc
libcpp/pch.cc
libcpp/traditional.cc

index 059cf2e8f79f440a8396f7a1acbb1597824876d9..38bdb7667c930a20c1598cc7aaeb90971982561c 100644 (file)
@@ -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)
 
 #\f
 # 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 = \
index 4f80e66aef684e90aa28c4d03b46cec7a90cb049..fb88a19f31bcd286da574e88f66e9f51b12e370b 100644 (file)
@@ -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;
     }
index 1efd209021f3ba437900a6eed5cfaf89f422bcbd..28181774d5c2bc66371a24525cbbcd6c18c5d11a 100644 (file)
@@ -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
index 9596fe7e3a0939f157e0c063d45709ed83254e9b..ce3608c37303afc6fe769331a6e9ed312f3f88f6 100644 (file)
@@ -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 } */
index 9fa4fbfa30761de6a0fe3e0c3028cbfa6922cf7b..b4b4789d89ff6f01ab8d8b86a78e3838a17fd681 100644 (file)
@@ -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 } */
index 0d5a6a7afbeeda868a19a55b448569fe0c513d65..72da471b09791897b54d4d22767e78f8f75aee2a 100644 (file)
@@ -4,40 +4,40 @@
 // { dg-options "-finput-charset=UTF-8 -Winvalid-utf8" }
 
 // a\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" }
-// a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-// aà\9f\80a                               { dg-warning "invalid UTF-8 character <e0><9f><80>" }
-// aà¿a                                        { dg-warning "invalid UTF-8 character <e0><bf>" }
-// aì\80a                                        { dg-warning "invalid UTF-8 character <ec><80>" }
-// aí €a                               { dg-warning "invalid UTF-8 character <ed><a0><80>" }
-// að\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-// að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+// aà\9f\80a                               { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
+// aà¿a                                        { dg-warning "invalid UTF-8 character '<e0><bf>'" }
+// aì\80a                                        { dg-warning "invalid UTF-8 character '<ec><80>'" }
+// aí €a                               { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
+// að\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+// að\8f¿¿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\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" } */
-/* a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" } */
-/* aà\9f\80a                               { dg-warning "invalid UTF-8 character <e0><9f><80>" } */
-/* aà¿a                                        { dg-warning "invalid UTF-8 character <e0><bf>" } */
-/* aì\80a                                        { dg-warning "invalid UTF-8 character <ec><80>" } */
-/* aí €a                               { dg-warning "invalid UTF-8 character <ed><a0><80>" } */
-/* að\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" } */
-/* að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } */
+/* aà\9f\80a                               { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } */
+/* aà¿a                                        { dg-warning "invalid UTF-8 character '<e0><bf>'" } */
+/* aì\80a                                        { dg-warning "invalid UTF-8 character '<ec><80>'" } */
+/* aí €a                               { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } */
+/* að\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } */
+/* að\8f¿¿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 } */
index 9ab69e1d8f7fa8f760f55f5d807cc2b1be056eb8..b63b1d923bf04768be9a73051900c400dbd3d118 100644 (file)
@@ -11,78 +11,78 @@ typedef __CHAR16_TYPE__ char16_t;
 typedef __CHAR32_TYPE__ char32_t;
 #endif
 
-char32_t a = U'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-char32_t o = U'ð\8f¿¿';                          // { 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'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+char32_t o = U'ð\8f¿¿';                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";  // { dg-bogus "invalid UTF-8 character" }
-const char32_t *B = U"\80";                      // { 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"à\80¿";                    // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-const char32_t *K = U"à\9f\80";                    // { 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"ì\80";                     // { 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"ð\80\80\80";                   // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-const char32_t *P = U"ð\8f¿¿";                   // { 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"\80";                      // { 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"à\80¿";                    // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+const char32_t *K = U"à\9f\80";                    // { 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"ì\80";                     // { 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"ð\80\80\80";                   // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+const char32_t *P = U"ð\8f¿¿";                   // { 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"(\80߿ࠀ퟿ð€€ô¿¿)"; // { dg-bogus "invalid UTF-8 character" }
-const char32_t *B1 = UR"(\80)";                  // { 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"(à\80¿)";                        // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-const char32_t *K1 = UR"(à\9f\80)";                        // { 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"(ì\80)";                 // { 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"(ð\80\80\80)";               // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-const char32_t *P1 = UR"(ð\8f¿¿)";               // { 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"(\80)";                  // { 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"(à\80¿)";                        // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+const char32_t *K1 = UR"(à\9f\80)";                        // { 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"(ì\80)";                 // { 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"(ð\80\80\80)";               // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+const char32_t *P1 = UR"(ð\8f¿¿)";               // { 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"\80߿ࠀ퟿ð€€ô¿¿";    // { dg-bogus "invalid UTF-8 character" }
-const char *B2 = u8"\80";                                // { 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"à\80¿";                      // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-const char *K2 = u8"à\9f\80";                      // { 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"ì\80";                       // { 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"ð\80\80\80";                     // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-const char *P2 = u8"ð\8f¿¿";                     // { 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"\80";                                // { 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"à\80¿";                      // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+const char *K2 = u8"à\9f\80";                      // { 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"ì\80";                       // { 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"ð\80\80\80";                     // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+const char *P2 = u8"ð\8f¿¿";                     // { 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 }
index 4cb230f780fde97833a5075368623cb7340b5dce..444a350934a91fed764a22303ebb0a033f1af152 100644 (file)
@@ -6,22 +6,22 @@
 #define I(x)
 I(\80߿ࠀ퟿ð€€ô¿¿)       // { dg-bogus "invalid UTF-8 character" }
                                 // { dg-error "is not valid in an identifier" "" { target c++ } .-1 }
-I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
-I(à\9f\80)                         // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
-I(à¿)                          // { dg-warning "invalid UTF-8 character <e0><bf>" }
-I(ì\80)                          // { dg-warning "invalid UTF-8 character <ec><80>" }
-I(í €)                         // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
-I(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
-I(ð\8f¿¿)                                // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
-I(ô€€)                                // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c } }
+I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
+I(à\9f\80)                         // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
+I(à¿)                          // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
+I(ì\80)                          // { dg-warning "invalid UTF-8 character '<ec><80>'" }
+I(í €)                         // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
+I(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
+I(ð\8f¿¿)                                // { 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 }
index 7d6578d9ce378a7e71bb27664ac0e1b55cfdd8d3..86d891fcaf6ddde08d647482c55824e3c509f6ab 100644 (file)
@@ -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
index a3d1a6d102873569a63b900b1a0f69fc194986bd..44ed70f4a456c41819253ddac75f91f5a84651c2 100644 (file)
@@ -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
index e9cefbecb1f0956e718be0f3dec6dfbbb5d75364..67bbe87ec470712b275ec52e3ac8b90404af39ff 100644 (file)
@@ -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'" } */
index 89ea3fa177d7aeda050f801afe713417976317aa..30fcde82aa6e2370bbb1cd1421946cd57f1a83ac 100644 (file)
 /* { 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" } */
index 1c2319d96fa26e89ad49eb5881888d48c6f5b8df..33aa32265fbd201003d7e77bf6292d7775a01c51 100644 (file)
@@ -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
 /* { 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 } */
index 9cc4fed65646268c3c14560677a6f025a8724d15..4abc57e9ea0c743d7b83a22a9ba4daa884ce2795 100644 (file)
@@ -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} } */
index e309a548c0c0f00956d8b5e30f57ba6da0277e88..d95c7760291c8dafcd30d4423bb8f2e0466ba8ee 100644 (file)
@@ -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 )
index 134c29805c89063c5b2777c4f0e86cf13d984e08..7611dba0e2d6e8ceec6f46e081bb25df332d013a 100644 (file)
@@ -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\\\)" } */
index 93516519acee52477f45a9ad4def7f6ef5f16020..07bcbb72c61894045dc35e2faa1ae40122a231c7 100644 (file)
@@ -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
index 3ce2334087100fe813b2810f4b75a9028e59b4f7..c2ee8899a3c223ee714e36d71a5ea5e7ad77be9a 100644 (file)
@@ -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} }
index b067292375608e90119e4a0fd74cdd19413648ce..93612c5011228d203c8d06880ccbdf3f32e29dbd 100644 (file)
@@ -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" }
index 103e88ecd4dd72c6fe6998146b07aca8a6b0d02d..1ff075b1d79ce6b361db7bda1f54f3141fd52625 100644 (file)
@@ -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);
                   ^
index ef64488348d9bc7a41c80a507ef33da925da0077..d636dce1c5c56b7edf6be0f3d4c9c35c239c2101 100644 (file)
@@ -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 } */
index 72b026f85c0a04fa42637fc87fda1a9500dd802b..72a122ba4de13c688285e8feb7e8b7d2b33bc8d2 100644 (file)
@@ -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
          ^~~~~
          ^~~~~
 /* { 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)
              ^
index 75fdeff5937679686fdc696bec81eb573233807e..bd72edb1964f112ca2a4597960eee58ec5c97a83 100644 (file)
@@ -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" } */
index a1c53c7f649ae2e74416e25b21f7787b3ce0189a..5c5473134eae0a2ed74ef8a25d471fffc0c9a0d1 100644 (file)
@@ -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 } */
index d6c2414ea1f79e7ba8912455806a46a8420baf64..b7a425c16ea27ad4fc8211ca3b4ae02c43494f75 100644 (file)
@@ -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
index f32f0551723d597236dad70d9c259907f865ad71..a68bb2b0ac93998e9875796d2b05156501dd4ce7 100644 (file)
@@ -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" } */
 
index 5887bf5a4840091c0349ff92f9ca9eeac1a1cdb0..446142104e01828eaf93fdf6c5915c062ef13d7d 100644 (file)
@@ -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" } */
index 47f89232b1176d4d585e49e7872a9a37a5d7a485..9ac4a432c593be4040f1ee3f15848f2c7af7615d 100644 (file)
@@ -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>'"} } }
 */
index ead03a52fd6d7e390d716e4408f3d52c2e7215c6..944994822084c11456e9d6a9736116c82c103be7 100644 (file)
        { 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>'"} } }
 */
index c99a2c605a880bcadefc96baf6beae555d4a7aa9..7679ecc1b0d08785d3c7726bf3b715552abb44f8 100644 (file)
@@ -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" } */
index d6525e107bc29822f0517f28557421dfdeff8bdb..8605a5d02cb887de776ddd2347012b6397507cee 100644 (file)
@@ -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" } */
index d9acce06e057e54412798e4ad0d03e8d5ff47373..15e054c7273d8bd9e436847fe8b4901c0962589c 100644 (file)
@@ -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
index f7d4007d3451389d8dee5fff198bd628eb32919b..7e772a05afc9f472352917744d281775654352bb 100644 (file)
@@ -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
index 94d2118aae0c1adce2414d39f91cfc8fc3263e68..fc7b02131be74c91ee3e56efaaf10db3ef389067 100644 (file)
@@ -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
 
 #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
index bb9b8efab9484fbaaf72f7d298440d75a549fd0f..413deb944ddcb2c8bd6e670e3dcb3315479bb4fb 100644 (file)
@@ -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
 
 #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
index b1427ff03936aa9a421e094aee8ef7e67c938931..e7e0b8327a0da0afda0cd60a4d7da6374cf6db25 100644 (file)
@@ -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" }
 );
index 45cf8b0a09146390555f6a3bb4eb62249a40ca30..6c2393f9c0d95b21711b5e34ed1612a51f950a34 100644 (file)
@@ -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" }
 );
index 0c6045af8d1487369cc725a890dfeae615148369..17e75f717952be58051bc4a4b4249a524788923a 100644 (file)
@@ -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" } */
index 2d857cf747c9012889172af6a3b8110a186c9dec..604a79d1f0c9ed5e50ff7a3b3d1e0d8e3acdc068 100644 (file)
@@ -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 }
index d6d5d9fc0813061f1837ad59ce1d7790dfc8e67a..ae15b6b8c02fd3e643e7116705a383018618489c 100644 (file)
@@ -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 }
index ea939c52c3394363a0ba1cbe9c3e72ed62d9c06e..77a315a2143439174249129128493b4c665c7514 100644 (file)
@@ -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
index 95e3827df30087712e00b6b8af862a9adfeb0642..b0ffc92bbee62f16ff76ac8b6d461385801af429 100644 (file)
@@ -4,40 +4,40 @@
 // { dg-options "-finput-charset=UTF-8" }
 
 // a\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" }
-// a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-// að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+// að\8f¿¿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\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" } */
-/* a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
-/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
-/* að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
+/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
+/* að\8f¿¿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 } */
index 4684b9dcd6f635500057fb1e9daaef111af0790a..764de49d2215a2e991fe18c7cee7fda8b385b947 100644 (file)
@@ -6,20 +6,20 @@
 #define I(x)
 I(\80߿ࠀ퟿ð€€ô¿¿)       // { dg-bogus "invalid UTF-8 character" }
                                 // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
-I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-I(ð\8f¿¿)                                // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
+I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+I(ð\8f¿¿)                                // { 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" }
index 85f04bf691da91e434c1d1003264a522dbf93f2e..aabbb0fcd38a8aa8ee0b30423ca999cfeb617a01 100644 (file)
@@ -6,20 +6,20 @@
 #define I(x)
 I(\80߿ࠀ퟿ð€€ô¿¿)       // { dg-bogus "invalid UTF-8 character" }
                                 // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
-I(\80)                           // { 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(à\80¿)                         // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-I(ð\8f¿¿)                                // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
+I(\80)                           // { 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(à\80¿)                         // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+I(ð\8f¿¿)                                // { 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" }
index 6a4091fbb531cf131f2ca1aa4f43204cd330d075..a09d920e9c6a61ec9336bc00ad40fe75ce601487 100644 (file)
@@ -6,20 +6,20 @@
 #define I(x)
 I(\80߿ࠀ퟿ð€€ô¿¿)       // { dg-bogus "invalid UTF-8 character" }
                                 // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
-I(\80)                           // { 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(à\80¿)                         // { dg-bogus "invalid UTF-8 character <e0><80><bf>" }
-I(à\9f\80)                         // { dg-bogus "invalid UTF-8 character <e0><9f><80>" }
-I(à¿)                          // { dg-bogus "invalid UTF-8 character <e0><bf>" }
-I(ì\80)                          // { dg-bogus "invalid UTF-8 character <ec><80>" }
-I(í €)                         // { dg-bogus "invalid UTF-8 character <ed><a0><80>" }
-I(ð\80\80\80)                                // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" }
-I(ð\8f¿¿)                                // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" }
+I(\80)                           // { 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(à\80¿)                         // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" }
+I(à\9f\80)                         // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" }
+I(à¿)                          // { dg-bogus "invalid UTF-8 character '<e0><bf>'" }
+I(ì\80)                          // { dg-bogus "invalid UTF-8 character '<ec><80>'" }
+I(í €)                         // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" }
+I(ð\80\80\80)                                // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" }
+I(ð\8f¿¿)                                // { 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" }
index 70ab8e5afa96a8a279210533feea6418e7814224..6436705c0103e34a2bbf4296a8b0e593eb494f18 100644 (file)
@@ -4,40 +4,40 @@
 // { dg-options "-finput-charset=UTF-8 -pedantic" }
 
 // a\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" }
-// a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-// að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+// að\8f¿¿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\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" } */
-/* a\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
-/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
-/* að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
+/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
+/* að\8f¿¿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 } */
index c0f748bc96fe9a50c2bcf122f8caa0c3c4c39743..394599363b80dd75b99e7e2bbd821bf826c60a9e 100644 (file)
@@ -4,40 +4,40 @@
 // { dg-options "-finput-charset=UTF-8 -pedantic-errors" }
 
 // a\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" }
-// a\80a                                 { 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à\80¿a                               { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-// að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+// aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+// að\8f¿¿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\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" } */
-/* a\80a                                 { 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à\80¿a                               { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
-/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
-/* að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
+/* aà\9f\80a                               { 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ì\80a                                        { 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ð\80\80\80a                              { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
+/* að\8f¿¿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 } */
index 1dc65e3624b40afadc711917adafd8fa660cc276..33a7dca4ae4003bb7188ba11bddc77dbb0414046 100644 (file)
@@ -4,40 +4,40 @@
 // { dg-options "-finput-charset=UTF-8 -pedantic-errors -Wno-invalid-utf8" }
 
 // a\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" }
-// a\80a                                 { 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à\80¿a                               { dg-bogus "invalid UTF-8 character <e0><80><bf>" }
-// aà\9f\80a                               { dg-bogus "invalid UTF-8 character <e0><9f><80>" }
-// aà¿a                                        { dg-bogus "invalid UTF-8 character <e0><bf>" }
-// aì\80a                                        { dg-bogus "invalid UTF-8 character <ec><80>" }
-// aí €a                               { dg-bogus "invalid UTF-8 character <ed><a0><80>" }
-// að\80\80\80a                              { dg-bogus "invalid UTF-8 character <f0><80><80><80>" }
-// að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" }
+// aà\9f\80a                               { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" }
+// aà¿a                                        { dg-bogus "invalid UTF-8 character '<e0><bf>'" }
+// aì\80a                                        { dg-bogus "invalid UTF-8 character '<ec><80>'" }
+// aí €a                               { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" }
+// að\80\80\80a                              { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" }
+// að\8f¿¿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\80߿ࠀ퟿ð€€ô¿¿a             { dg-bogus "invalid UTF-8 character" } */
-/* a\80a                                 { 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à\80¿a                               { dg-bogus "invalid UTF-8 character <e0><80><bf>" } */
-/* aà\9f\80a                               { dg-bogus "invalid UTF-8 character <e0><9f><80>" } */
-/* aà¿a                                        { dg-bogus "invalid UTF-8 character <e0><bf>" } */
-/* aì\80a                                        { dg-bogus "invalid UTF-8 character <ec><80>" } */
-/* aí €a                               { dg-bogus "invalid UTF-8 character <ed><a0><80>" } */
-/* að\80\80\80a                              { dg-bogus "invalid UTF-8 character <f0><80><80><80>" } */
-/* að\8f¿¿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\80a                                 { 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à\80¿a                               { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" } */
+/* aà\9f\80a                               { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" } */
+/* aà¿a                                        { dg-bogus "invalid UTF-8 character '<e0><bf>'" } */
+/* aì\80a                                        { dg-bogus "invalid UTF-8 character '<ec><80>'" } */
+/* aí €a                               { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" } */
+/* að\80\80\80a                              { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" } */
+/* að\8f¿¿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 } */
index f0140ba0a82b12f9c0e7a654a71e9e20fd2ef3aa..43718b87cfc08a905b7e27a1904ac1d980bb1bdf 100644 (file)
@@ -3,78 +3,78 @@
 // { dg-do preprocess { target c++11 } }
 // { dg-options "-finput-charset=UTF-8" }
 
-char32_t a = U'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-char32_t o = U'ð\8f¿¿';                          // { 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'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+char32_t o = U'ð\8f¿¿';                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";             // { dg-bogus "invalid UTF-8 character" }
-auto B = U"\80";                                 // { 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"à\80¿";                               // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P = U"ð\8f¿¿";                              // { 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"\80";                                 // { 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"à\80¿";                               // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P = U"ð\8f¿¿";                              // { 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"(\80߿ࠀ퟿ð€€ô¿¿)";         // { dg-bogus "invalid UTF-8 character" }
-auto B1 = UR"(\80)";                             // { 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"(à\80¿)";                           // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P1 = UR"(ð\8f¿¿)";                          // { 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"(\80)";                             // { 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"(à\80¿)";                           // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P1 = UR"(ð\8f¿¿)";                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";           // { dg-bogus "invalid UTF-8 character" }
-auto B2 = u8"\80";                               // { 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"à\80¿";                             // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P2 = u8"ð\8f¿¿";                            // { 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"\80";                               // { 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"à\80¿";                             // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P2 = u8"ð\8f¿¿";                            // { 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 }
index 01023d390f15f0e376e13241664988f12217bde3..eb2bf36e624d0e1c2585ce5dcea1255d55cd28fb 100644 (file)
@@ -3,78 +3,78 @@
 // { dg-do preprocess { target c++11 } }
 // { dg-options "-finput-charset=UTF-8 -pedantic" }
 
-char32_t a = U'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-char32_t o = U'ð\8f¿¿';                          // { 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'\80';                             // { 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'à\80¿';                           // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+char32_t o = U'ð\8f¿¿';                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";             // { dg-bogus "invalid UTF-8 character" }
-auto B = U"\80";                                 // { 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"à\80¿";                               // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P = U"ð\8f¿¿";                              // { 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"\80";                                 // { 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"à\80¿";                               // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P = U"ð\8f¿¿";                              // { 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"(\80߿ࠀ퟿ð€€ô¿¿)";         // { dg-bogus "invalid UTF-8 character" }
-auto B1 = UR"(\80)";                             // { 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"(à\80¿)";                           // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P1 = UR"(ð\8f¿¿)";                          // { 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"(\80)";                             // { 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"(à\80¿)";                           // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P1 = UR"(ð\8f¿¿)";                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";           // { dg-bogus "invalid UTF-8 character" }
-auto B2 = u8"\80";                               // { 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"à\80¿";                             // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P2 = u8"ð\8f¿¿";                            // { 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"\80";                               // { 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"à\80¿";                             // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P2 = u8"ð\8f¿¿";                            // { 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 }
index 7991a64ecc94ed4b5cf660a333047abe2181698d..d6a094ba7bb1152695652b7f2b163f69f1730423 100644 (file)
@@ -3,78 +3,78 @@
 // { dg-do preprocess { target c++11 } }
 // { dg-options "-finput-charset=UTF-8 -pedantic-errors" }
 
-char32_t a = U'\80';                             // { 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'à\80¿';                           // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-char32_t o = U'ð\8f¿¿';                          // { 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'\80';                             // { 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'à\80¿';                           // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+char32_t o = U'ð\8f¿¿';                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";             // { dg-bogus "invalid UTF-8 character" }
-auto B = U"\80";                                 // { 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"à\80¿";                               // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P = U"ð\8f¿¿";                              // { 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"\80";                                 // { 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"à\80¿";                               // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P = U"ð\8f¿¿";                              // { 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"(\80߿ࠀ퟿ð€€ô¿¿)";         // { dg-bogus "invalid UTF-8 character" }
-auto B1 = UR"(\80)";                             // { 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"(à\80¿)";                           // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P1 = UR"(ð\8f¿¿)";                          // { 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"(\80)";                             // { 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"(à\80¿)";                           // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P1 = UR"(ð\8f¿¿)";                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";           // { dg-bogus "invalid UTF-8 character" }
-auto B2 = u8"\80";                               // { 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"à\80¿";                             // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P2 = u8"ð\8f¿¿";                            // { 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"\80";                               // { 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"à\80¿";                             // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P2 = u8"ð\8f¿¿";                            // { 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 }
index 95c8a91722a03685c955c33993eef9b5291651de..d2f9452f3cda37a50af5b6cd8b269744e8730476 100644 (file)
@@ -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'\80';                             // { 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'à\80¿';                           // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-char32_t o = U'ð\8f¿¿';                          // { 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'\80';                             // { 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'à\80¿';                           // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+char32_t j = U'à\9f\80';                           // { 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'ì\80';                            // { 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'ð\80\80\80';                          // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+char32_t o = U'ð\8f¿¿';                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";             // { dg-bogus "invalid UTF-8 character" }
-auto B = U"\80";                                 // { 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"à\80¿";                               // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P = U"ð\8f¿¿";                              // { 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"\80";                                 // { 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"à\80¿";                               // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K = U"à\9f\80";                               // { 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"ì\80";                                        // { 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"ð\80\80\80";                              // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P = U"ð\8f¿¿";                              // { 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"(\80߿ࠀ퟿ð€€ô¿¿)";         // { dg-bogus "invalid UTF-8 character" }
-auto B1 = UR"(\80)";                             // { 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"(à\80¿)";                           // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P1 = UR"(ð\8f¿¿)";                          // { 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"(\80)";                             // { 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"(à\80¿)";                           // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K1 = UR"(à\9f\80)";                           // { 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"(ì\80)";                            // { 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"(ð\80\80\80)";                          // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P1 = UR"(ð\8f¿¿)";                          // { 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"\80߿ࠀ퟿ð€€ô¿¿";           // { dg-bogus "invalid UTF-8 character" }
-auto B2 = u8"\80";                               // { 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"à\80¿";                             // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-auto P2 = u8"ð\8f¿¿";                            // { 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"\80";                               // { 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"à\80¿";                             // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+auto K2 = u8"à\9f\80";                             // { 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"ì\80";                              // { 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"ð\80\80\80";                            // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+auto P2 = u8"ð\8f¿¿";                            // { 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 }
index 0afc94549e0b5fcef7b44712955b878204473ab9..7cda0c4956620be3ed221e20715aae15d4cfb614 100644 (file)
@@ -6,20 +6,20 @@
 #define I(x)
 I(\80߿ࠀ퟿ð€€ô¿¿)       // { dg-bogus "invalid UTF-8 character" }
                                 // { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
-I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
-I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
-I(ð\8f¿¿)                                // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
+I(\80)                           // { 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(à\80¿)                         // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
+I(à\9f\80)                         // { 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(ì\80)                          // { 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(ð\80\80\80)                                // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
+I(ð\8f¿¿)                                // { 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" }
index fe494824ed48ff6ea1655dbb6281c464e9de1933..9cdc000b37070508ebc05610ff7ab77b53c77109 100644 (file)
@@ -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 }
index 8699e098c88774673b968d9960e08b779a7ed844..4aa6ed0d2432800c56517a31dcdcef175680e377 100644 (file)
@@ -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 }
index 3d9afdcd395f6ff4e1a21c3cf744722ee9e90c7a..8a95bc22adf08ea8ee0d491bfc4c5e51be704327 100644 (file)
@@ -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 }
index ae8b9cbd0f46988a27b832e9dd4c4f21677bfe4c..18fbe3d187d528b409cef0c9e56c8e52cbdae2e1 100644 (file)
@@ -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 }
index 0b31cc42d78fa23c33c8de10c70ad340b75dcc11..4a03f9ed6efbf002d3db0d6ffa1c284a83032cc5 100644 (file)
@@ -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)
 {
index 32c9d65a5ed2c5e29d7e45e91276bfffd0e81809..cc8e63ad6f3442fcf4bc3295cf5fbe3945ce98aa 100644 (file)
@@ -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" } */
 }
index 8090015f69344ca55cf9cb91cfa73e837bc56496..9a83053eec69f57cc98386685a6f3a80a5e7705d 100644 (file)
@@ -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.  */
index 4266500b8ea166fd91ec83bf610548ffab73db5a..c94114cbc4e562ee18f6bf909154a2d2284d7287 100644 (file)
@@ -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 /\
index 7a2598e4f6bef41fa647c1566467b8e583840eeb..b99012bccc464c686bb06a0e8db23d53af76e478 100644 (file)
@@ -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 } */
index 6b15035b0c556706df5639ff159591d4ef5fba74..33d72bbc86fffbc8d1cceeeb7f6443bdc2827d4c 100644 (file)
@@ -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 } */
index 124d168ad6d28f1a55616ee6cf4ee5ad7dd46ea3..44da0f7ae7d3ef7d2bf9a2568bf0e37d2cce26a3 100644 (file)
@@ -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 } */
index 35eb4aa850cc86d13f2d79fb847a667bb4e5d1c8..f254e6757bf964642e807cef16d82f0965714ebb 100644 (file)
@@ -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
index bfa52b405487fcdfec29ce0bac52a97975bd5536..880e8ab75b64fe1c5c238e8d04e792ba50bf1d74 100644 (file)
@@ -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 } */
index f6c2323cd26ca9960bb3456aaac3629748d4430a..916c110412138e18c92c7a9972ddf6ec36f3e8cb 100644 (file)
@@ -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__
index 02779405930ee4ecd3ab9bd2a2e58d545488eb2d..8c2f786acd52275072c0b0403464b66d17922ad9 100644 (file)
@@ -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__
index 2e8ce6c0a70751fdfdb59491e31b86da6dced40a..08323302222bf6b10af9c7b3cfa0b5db62b6e285 100644 (file)
@@ -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 } */
index 055e17ae753a8421d451c1a149d8f19e8e3f7b08..d08cb0ceb535377e5f40b775a66cf85c27b93726 100644 (file)
@@ -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
index e5bd7056de341c6feeebcd4fee0f7832b0f3ee7f..5bb67ac231f75e11f5c0dd30f10ffac397726e0c 100644 (file)
@@ -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
index 175eb165f3e148be96cfc3ea3b9093a20ca9ae01..515c9a29741c022dd41759b91d37a4f2fe293122 100644 (file)
@@ -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
 
 #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
index 0d4099847cfd2faf3f7be20a155e5fea8958882c..c7d175cd82a66f88405f8022feaaea679315ddd3 100644 (file)
@@ -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
 
 #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
index 4a58cb93b8b3a98859d033fbcd06a73800f8f520..1d6ebbdafdcaa944884d815a92cef5936eb26927 100644 (file)
@@ -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 } */
index 659e8676dfeda0aec3a0a0a38b752e7802426d36..16210a0a0d2cf0c5612545b2f815cc22de096e5b 100644 (file)
@@ -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 } */
index 6c7084cf030e329798088eb663bbb01f6b2dd0f4..4cbcb32cdc33085a9b1122b573401c9654ee639a 100644 (file)
@@ -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 } */
index c5c4b3de61a3960f0f5e80acdc82d06bb6e9eb26..fefd7d3e9b3dfb3635b2fb01d4fe6a59f5aaf8d5 100644 (file)
@@ -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 } */
index c76a3fe71a4be4ac1eac1e4a1068c17fb1bbc5bd..450c4c0cc2398ca896ba64f4aae39b8e78390b4a 100644 (file)
@@ -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" } */
index 1af9605eac6cfcdd4626cd6cef18e90420fbb7f9..91cdcc0d82e4b3c2a3db40f9f0c158f74d266af3 100644 (file)
@@ -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" } */
index 137064eba3f82cc0eb65c32369b91e3a70f27ef3..9136f0f36729b6c5886e1f47a102255bc2c7fb3a 100644 (file)
@@ -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.  */
index f9b047b8a258c3ba1e3889decce119b31090aeed..b514017ba7406c174e3fa77f883a6d274bb43064 100644 (file)
@@ -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
index 3091c9de46d64e44db043cf6cb554f5481995f20..2d972745acccaf467e32b85358121a2a65c90e28 100644 (file)
@@ -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 }
index bba72f0fb10b2dab722cf5ccad33a634195be2ab..ce673029c15eded90c550f013b347c3ddcc0f1bd 100644 (file)
@@ -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 }
index 8d7a575ba44de7315a65c20a712eb61ffffa2f40..6830cf83413c96ac0f8160729b42a79d5b72b635 100644 (file)
@@ -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 }
index 69c4cfa0c3e7d41a7ce83feaa141f96d05357cb4..a8019f308cb285b2c6a0476ac14696d9c2e44f85 100644 (file)
@@ -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." }
index 2e7b25932351a80586ed2268b0805cafc4eda8cf..a0b9bec2a46cede822f52b6d0b5e22b66daea798 100644 (file)
@@ -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." }
index 8bd608ab7945a7faf82f24a62adf56eb297b6787..b1d5c248ed0c79732e08048c1cfba8fa1f374dad 100644 (file)
@@ -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
index 84214b1f8dbdb052efb213dfce1b43c9a4cbd16e..e363818ab66dc7ea3685e84717f50520b00aee1c 100644 (file)
@@ -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
index a39cba49014d40cb7f196ee9df6b254e8c4f2d15..8f360eaa9a4e432136fb4670b7c91047c0e9bddf 100644 (file)
@@ -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
index ac39cc8eaef474e60f1a62f869697a23690db070..2096938d16ae4555b1f74db5952e8288808ac056 100644 (file)
@@ -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
index c047f5f00adfa7249cfc5582f2bf3f24fa9d9bdf..a857bc756a0196fc25903f3c07273361e4eaea2d 100644 (file)
@@ -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=." }
index 5c8c7c5007e2ce00c84889c9331d284cd868b2f1..ca00eea4a32408bb12e10385d6620e084b2630dd 100644 (file)
@@ -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=." }
index 225fc4de01d815a1c2147fb4baa6f0f8cdcd499c..19be4dc72247ed4461fc4a2f255d3fadffc39ebf 100644 (file)
@@ -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=." }
index e6e1f3ef63f987dcb3e6db48bc5e146a06ae1bd6..e3b7a96b4e605798a514262abdfce09c699fd62f 100644 (file)
@@ -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
      ^~~~~~~~~~~~~~~~~~~~~~~~~
index f9f2f7a79f32fe3ab74ef55b7a69bbb25c1b5199..5dd1e1ebff23188920df3e04e35d9bb7df01e5f1 100644 (file)
@@ -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
      ^~~~~~~~~~~~~~~~~~~~~
index 3e2e57a79bbc997f9f3a51ff6347a44c87a53438..df8de47754ed2770f4bb1411b88a2f0685afc887 100644 (file)
@@ -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 }
index c562d072e402cb2e9e98d00e8c08ed2c60b92702..0d6a3228f58ae761115cca085bf30ff9071e0211 100644 (file)
@@ -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 }
index 05477afefa9d73d0b3a55db09aeab5572a255c27..71da781c02c82b971daa204deb86ef2291d9d724 100644 (file)
@@ -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." }
index f72f6db69d5b702e04835d7f772059018ca23003..4b46e58fb17f154ffd13a68837f3852d1cc480b6 100644 (file)
@@ -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." }
index 4f3779df2212b3319a6d0f69110661620379c856..1c2732e06d7c482a1f3a16c7dc92592fbb45fe8f 100644 (file)
@@ -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." }
index ff87ae549511aea7cc8812f7e287849d650ad184..1404c140bb4ec36471559532c4f8d7b8b0d3c303 100644 (file)
@@ -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." }
index e7537c8684d746dfda6c53f36112b6e36023e598..0918ecdb387d992f62d6ceefda3030345837e99c 100644 (file)
@@ -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." }
index d8333d4c3b5f0df84bbab829c0579fe6b3fe99a3..44302564e91d2469bc5b9382b63c9fa8d761195d 100644 (file)
@@ -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." }
index e71aebafcf09078d71be45e8208ad5759918ba2a..e5723872804cf9d4d100cb795b3cd1293a8d5ca3 100644 (file)
@@ -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
index 2c2c4219e2eba80837c95564540751ba94c7f8b5..786fa89563e72c6e76db435ce84cf0ec77d34bc0 100644 (file)
@@ -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
index 7c3efe05351913a49d9cef6e7a83d03dfd5a50c6..a3cdd07d98248930e7f66454cdc0298d13c9e6bd 100644 (file)
@@ -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." }
index 74df23971a968b508e95fe1f95132e571df24b33..93bd8b7c7ae4a223420e9b92c15229ebda307e64 100644 (file)
@@ -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." }
index c0d25bf3fccaff0a238596b709123c48a6fb8689..ccf454802700051ddaa507bcd7ef7b445bf61f18 100644 (file)
@@ -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 } */
index 7e47153264c01ac856f68298b0f5cedd8263a599..eff0dd67ff0b36afef310879dc96c9aa7a173e22 100644 (file)
@@ -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
 
index 32b6fd5b5a4ee28f06362ef9f5737fd1c83ee05d..c7d45088128fb70f536a94e53dbdade340820d9a 100644 (file)
@@ -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");
index 9c906b39066056fc03cf7bcd9771cfe1d7e6b1e7..50fa8ace2f681041302e7e991143f76544de0416 100644 (file)
@@ -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, &params.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
index 295496df7ed0a2cb34b7528afa080dda7b5d9f03..5d8ceb936f92a50f7aa2b583507bd6fc94ab87aa 100644 (file)
@@ -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,
index 089bf3eddde70dcbe4926888e595f018e92d4ed9..b7772c9bd6c6d09dd3e684515e3d8e7bd000b1f2 100644 (file)
@@ -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));
 }
 
index 5f9fbc54e999fc1d184a398de0a5c025ce898dcd..8f9a5a4f79723488fe008c360e7335ca2ca4c357 100644 (file)
@@ -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 = &params->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);
        }
     }
index bff660174f5f17c366704388579fffc111cfe29e..e64c2b6b20baacb3bfbe1ebec10fd9f7efcafd5e 100644 (file)
@@ -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 *);
index 3e4a2bc0ae79e919deb5de0563912a4d7cde9dca..1cc62a4242c9666304204f053aa843239bfd47c9 100644 (file)
@@ -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))
index 4025e5cd3d9deb0cb645543c8e4ed246b60d6124..66ff6cedb4b4d99e87a7c28b1f5c09c6152320cd 100644 (file)
@@ -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));
        }
index 2fb38618246aa5c2efc868bc046fa23f452476dc..f0dfc795ee68c886f2825ed7c7467d5246530e34 100644 (file)
@@ -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;
            }
        }
index f2f74ed6ea9ab545a865fd54b04344440e58d252..0989fb38eb8ad2e7350464eaf33b2dd6f0f7a0a0 100644 (file)
@@ -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;
     }
index cf0ef4c0c6912e35e12af6e2c07b28e68ca0d8cc..ac01f9d0dc89301bc4ad732146e4e32f5f9e06dd 100644 (file)
@@ -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;