libcpp, genmatch: Use gcc_diag instead of printf for libcpp diagnostics

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.
This commit is contained in:
Jakub Jelinek 2024-10-12 10:44:17 +02:00 committed by Jakub Jelinek
parent c20c9d8408
commit c397a8c122
120 changed files with 1276 additions and 1261 deletions

View 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)
#
# 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 = \

View 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;
}

View 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)
void
fatal (const char *format, ...)
{
return NULL;
}
void ggc_free (void *)
{
}
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

View 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 } */

View 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 } */

View File

@ -4,40 +4,40 @@
// { dg-options "-finput-charset=UTF-8 -Winvalid-utf8" }
// a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" }
// a€a { dg-warning "invalid UTF-8 character <80>" }
// a¿a { dg-warning "invalid UTF-8 character <bf>" }
// aÀa { dg-warning "invalid UTF-8 character <c0>" }
// aÁa { dg-warning "invalid UTF-8 character <c1>" }
// aõa { dg-warning "invalid UTF-8 character <f5>" }
// aÿa { dg-warning "invalid UTF-8 character <ff>" }
// aÂa { dg-warning "invalid UTF-8 character <c2>" }
// aàa { dg-warning "invalid UTF-8 character <e0>" }
// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" }
// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" }
// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" }
// aì€a { dg-warning "invalid UTF-8 character <ec><80>" }
// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" }
// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
// að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
// aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
// a€a { dg-warning "invalid UTF-8 character '<80>'" }
// a¿a { dg-warning "invalid UTF-8 character '<bf>'" }
// aÀa { dg-warning "invalid UTF-8 character '<c0>'" }
// aÁa { dg-warning "invalid UTF-8 character '<c1>'" }
// aõa { dg-warning "invalid UTF-8 character '<f5>'" }
// aÿa { dg-warning "invalid UTF-8 character '<ff>'" }
// aÂa { dg-warning "invalid UTF-8 character '<c2>'" }
// aàa { dg-warning "invalid UTF-8 character '<e0>'" }
// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" }
// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" }
// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
// að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
// aô<61>€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 }
/* a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" } */
/* a€a { dg-warning "invalid UTF-8 character <80>" } */
/* a¿a { dg-warning "invalid UTF-8 character <bf>" } */
/* aÀa { dg-warning "invalid UTF-8 character <c0>" } */
/* aÁa { dg-warning "invalid UTF-8 character <c1>" } */
/* aõa { dg-warning "invalid UTF-8 character <f5>" } */
/* aÿa { dg-warning "invalid UTF-8 character <ff>" } */
/* aÂa { dg-warning "invalid UTF-8 character <c2>" } */
/* aàa { dg-warning "invalid UTF-8 character <e0>" } */
/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" } */
/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" } */
/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" } */
/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" } */
/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" } */
/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" } */
/* aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" } */
/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" } */
/* { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } */
/* a€a { dg-warning "invalid UTF-8 character '<80>'" } */
/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" } */
/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" } */
/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" } */
/* aõa { dg-warning "invalid UTF-8 character '<f5>'" } */
/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" } */
/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" } */
/* aàa { dg-warning "invalid UTF-8 character '<e0>'" } */
/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" } */
/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" } */
/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" } */
/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" } */
/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" } */
/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" } */
/* aô<61>€€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 } */

View File

@ -11,78 +11,78 @@ typedef __CHAR16_TYPE__ char16_t;
typedef __CHAR32_TYPE__ char32_t;
#endif
char32_t a = U''; // { dg-warning "invalid UTF-8 character <80>" }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character <ec><80>" }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
char32_t a = U''; // { dg-warning "invalid UTF-8 character '<80>'" }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character '<ec><80>'" }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 }
const char32_t *A = U"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
const char32_t *B = U""; // { dg-warning "invalid UTF-8 character <80>" }
const char32_t *C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" }
const char32_t *D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" }
const char32_t *E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" }
const char32_t *F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" }
const char32_t *G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" }
const char32_t *H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" }
const char32_t *I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" }
const char32_t *J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
const char32_t *K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
const char32_t *L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" }
const char32_t *M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" }
const char32_t *N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
const char32_t *O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
const char32_t *P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
const char32_t *Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" }
const char32_t *R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
const char32_t *B = U""; // { dg-warning "invalid UTF-8 character '<80>'" }
const char32_t *C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" }
const char32_t *D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" }
const char32_t *E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" }
const char32_t *F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" }
const char32_t *G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" }
const char32_t *H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" }
const char32_t *I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" }
const char32_t *J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
const char32_t *K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
const char32_t *L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
const char32_t *M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" }
const char32_t *N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
const char32_t *O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
const char32_t *P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
const char32_t *Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" }
const char32_t *R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 }
const char32_t *A1 = UR"(€߿ࠀ퟿𐀀􏿿)"; // { dg-bogus "invalid UTF-8 character" }
const char32_t *B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" }
const char32_t *C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" }
const char32_t *D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" }
const char32_t *E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" }
const char32_t *F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" }
const char32_t *G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" }
const char32_t *H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" }
const char32_t *I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" }
const char32_t *J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
const char32_t *K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
const char32_t *L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" }
const char32_t *M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" }
const char32_t *N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
const char32_t *O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
const char32_t *P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
const char32_t *Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" }
const char32_t *R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
const char32_t *B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" }
const char32_t *C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" }
const char32_t *D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" }
const char32_t *E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" }
const char32_t *F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" }
const char32_t *G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" }
const char32_t *H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" }
const char32_t *I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" }
const char32_t *J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
const char32_t *K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
const char32_t *L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
const char32_t *M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" }
const char32_t *N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
const char32_t *O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
const char32_t *P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
const char32_t *Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" }
const char32_t *R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 }
const char *A2 = u8"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
const char *B2 = u8""; // { dg-warning "invalid UTF-8 character <80>" }
const char *C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" }
const char *D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" }
const char *E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" }
const char *F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" }
const char *G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" }
const char *H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" }
const char *I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" }
const char *J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
const char *K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
const char *L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" }
const char *M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" }
const char *N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
const char *O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
const char *P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
const char *Q2 = u8"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" }
const char *R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-warning "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
const char *B2 = u8""; // { dg-warning "invalid UTF-8 character '<80>'" }
const char *C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" }
const char *D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" }
const char *E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" }
const char *F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" }
const char *G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" }
const char *H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" }
const char *I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" }
const char *J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
const char *K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
const char *L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
const char *M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" }
const char *N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
const char *O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
const char *P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
const char *Q2 = u8"ô<EFBFBD>€€"; // { 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 }

View File

@ -6,22 +6,22 @@
#define I(x)
I(€߿𐀀􏿿) // { dg-bogus "invalid UTF-8 character" }
// { dg-error "is not valid in an identifier" "" { target c++ } .-1 }
I() // { dg-warning "invalid UTF-8 character <80>" }
I(¿) // { dg-warning "invalid UTF-8 character <bf>" }
I(À) // { dg-warning "invalid UTF-8 character <c0>" }
I(Á) // { dg-warning "invalid UTF-8 character <c1>" }
I(õ) // { dg-warning "invalid UTF-8 character <f5>" }
I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" }
I(Â) // { dg-warning "invalid UTF-8 character <c2>" }
I(à) // { dg-warning "invalid UTF-8 character <e0>" }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" }
I(àŸ) // { dg-warning "invalid UTF-8 character <e0><9f><80>" }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" }
I(ì) // { dg-warning "invalid UTF-8 character <ec><80>" }
I(í ) // { dg-warning "invalid UTF-8 character <ed><a0><80>" }
I(ð) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" }
I(ô<EFBFBD>) // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c } }
I() // { dg-warning "invalid UTF-8 character '<80>'" }
I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" }
I(À) // { dg-warning "invalid UTF-8 character '<c0>'" }
I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" }
I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" }
I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" }
I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" }
I(à) // { dg-warning "invalid UTF-8 character '<e0>'" }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" }
I(àŸ) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" }
I(ì) // { dg-warning "invalid UTF-8 character '<ec><80>'" }
I(í ) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" }
I(ð) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" }
I(ô<EFBFBD>) // { 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 }

View 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

View 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

View 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'" } */

View File

@ -53,20 +53,20 @@
/* { dg-error "unbalanced '\\\)'" "" { target *-*-* } .-1 } */
/* { dg-error "unbalanced '\\\['" "" { target *-*-* } .-2 } */
/* { dg-error "unbalanced '\\\('" "" { target *-*-* } .-3 } */
#embed limit(1) /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */
#embed limit(1) /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */
#define FOO 1
#embed __FILE__ limit(0 + defined(FOO)) /* { dg-error "'defined' in #embed parameter" } */
#embed /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */
#embed __FILE__ limit(0 + defined(FOO)) /* { dg-error "'defined' in '#embed' parameter" } */
#embed /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */
#embed "
/* { dg-warning "missing terminating \\\" character" "" { target *-*-* } .-1 } */
/* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" "" { target *-*-* } .-2 } */
/* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" "" { target *-*-* } .-2 } */
#embed <
/* { dg-error "empty filename in #embed" "" { target *-*-* } .-1 } */
/* { dg-error "missing terminating > character" "" { target *-*-* } .-2 } */
#embed > /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */
/* { dg-error "missing terminating '>' character" "" { target *-*-* } .-2 } */
#embed > /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */
#embed "" /* { dg-error "empty filename in #embed" } */
#embed <> /* { dg-error "empty filename in #embed" } */
#embed embed-4.c /* { dg-error "#embed expects \\\"FILENAME\\\" or <FILENAME>" } */
#embed embed-4.c /* { dg-error "'#embed' expects '\\\"FILENAME\\\"' or '<FILENAME>'" } */
#embed __FILE__ foo: /* { dg-error "expected parameter name" } */
/* { dg-error "unknown embed parameter 'foo'" "" { target *-*-* } .-1 } */
#embed __FILE__ bar:: /* { dg-error "expected parameter name" } */

View 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
@ -81,35 +81,35 @@
/* { dg-error "expected '\\\)'" "" { target *-*-* } .-3 } */
#endif
#define FOO 1
#if 1 + __has_embed (limit(1)) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */
/* { dg-error "missing binary operator before token \\\"1\\\"" "" { target *-*-* } .-1 } */
#if 1 + __has_embed (limit(1)) /* { dg-error "operator '__has_embed' requires a header-name" } */
/* { dg-error "missing binary operator before token '1'" "" { target *-*-* } .-1 } */
#endif
#if 1 + __has_embed (__FILE__ limit(0 + defined(FOO))) /* { dg-error "'defined' in #embed parameter" } */
#if 1 + __has_embed (__FILE__ limit(0 + defined(FOO))) /* { dg-error "'defined' in '#embed' parameter" } */
#endif
int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside of preprocessing directive" } */
#if __has_embed /* { dg-error "missing '\\\(' before \\\"__has_embed\\\" operand" } */
/* { dg-error "operator \\\"__has_embed\\\" requires a header-name" "" { target *-*-* } .-1 } */
int a = __has_embed (__FILE__); /* { dg-error "'__has_embed' used outside of preprocessing directive" } */
#if __has_embed /* { dg-error "missing '\\\(' before '__has_embed' operand" } */
/* { dg-error "operator '__has_embed' requires a header-name" "" { target *-*-* } .-1 } */
#endif
#if __has_embed( /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */
#if __has_embed( /* { dg-error "operator '__has_embed' requires a header-name" } */
#endif
#if __has_embed() /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */
#if __has_embed() /* { dg-error "operator '__has_embed' requires a header-name" } */
#endif
#if __has_embed(")
/* { dg-warning "missing terminating \\\" character" "" { target *-*-* } .-1 } */
/* { dg-error "operator \\\"__has_embed\\\" requires a header-name" "" { target *-*-* } .-2 } */
/* { dg-error "operator '__has_embed' requires a header-name" "" { target *-*-* } .-2 } */
#endif
#if __has_embed(<)
/* { dg-error "missing terminating > character" "" { target *-*-* } .-1 } */
/* { dg-error "missing terminating '>' character" "" { target *-*-* } .-1 } */
/* { dg-error "expected '\\\)'" "" { target *-*-* } .-2 } */
#endif
#if __has_embed(>) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */
#if __has_embed(>) /* { dg-error "operator '__has_embed' requires a header-name" } */
#endif
#if __has_embed("") /* { dg-error "empty filename in '__has_embed'" } */
#endif
#if __has_embed(<>) /* { dg-error "empty filename in '__has_embed'" } */
#endif
#if __has_embed(embed-4.c) /* { dg-error "operator \\\"__has_embed\\\" requires a header-name" } */
/* { dg-error "missing binary operator before token \\\"4.c\\\"" "" { target *-*-* } .-1 } */
#if __has_embed(embed-4.c) /* { dg-error "operator '__has_embed' requires a header-name" } */
/* { dg-error "missing binary operator before token '4.c'" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ foo:) /* { dg-error "expected parameter name" } */
/* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */
@ -120,10 +120,10 @@ int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside
/* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ foo:bar) /* { dg-error "expected parameter name" } */
/* { dg-error "missing binary operator before token \\\"bar\\\"" "" { target *-*-* } .-1 } */
/* { dg-error "missing binary operator before token 'bar'" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ foo::bar::baz) /* { dg-error "expected parameter name" } */
/* { dg-error "missing binary operator before token \\\"baz\\\"" "" { target *-*-* } .-1 } */
/* { dg-error "missing binary operator before token 'baz'" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ foo : : bar) /* { dg-error "expected parameter name" } */
/* { dg-error "':' without preceding '\\\?'" "" { target *-*-* } .-1 } */
@ -132,7 +132,7 @@ int a = __has_embed (__FILE__); /* { dg-error "\\\"__has_embed\\\" used outside
/* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ 42::foo) /* { dg-error "expected parameter name" } */
/* { dg-error "token \\\"::\\\" is not valid in preprocessor expressions" "" { target *-*-* } .-1 } */
/* { dg-error "token '::' is not valid in preprocessor expressions" "" { target *-*-* } .-1 } */
#endif
#if __has_embed(__FILE__ foo::42) /* { dg-error "expected parameter name" } */
/* { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 } */

View 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} } */

View 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 )

View 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\\\)" } */

View 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

View 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} }

View 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" }

View 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);
^

View 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 } */

View 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
^~~~~
@ -32,20 +32,20 @@
^~~~~
/* { dg-end-multiline-output "" } */
#define MACRO /* { dg-warning {"MACRO" redefined} } */
#define MACRO /* { dg-warning {'MACRO' redefined} } */
/* { dg-begin-multiline-output "" }
#define MACRO
^~~~~
{ dg-end-multiline-output "" } */
#define MACRO2(x,y) x /* { dg-note {macro "MACRO2" defined here} } */
#define MACRO2(x,y) x /* { dg-note {macro 'MACRO2' defined here} } */
/* { dg-begin-multiline-output "" }
#define MACRO2(x,y)
^~~~~~
{ dg-end-multiline-output "" } */
MACRO2(MACRO, MACRO)
MACRO2(MACRO) /* { dg-error {macro "MACRO2" requires 2 arguments, but only 1 given} } */
MACRO2(MACRO) /* { dg-error {macro 'MACRO2' requires 2 arguments, but only 1 given} } */
/* { dg-begin-multiline-output "" }
MACRO2(MACRO)
^

View 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" } */

View 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 } */

View 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

View 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" } */

View 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" } */

View 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>'"} } }
*/

View File

@ -54,42 +54,42 @@
{ dg-final { scan-sarif-file "\"level\": \"warning\"" } }
{ dg-final { scan-sarif-file "\"ruleId\": \"-Winvalid-utf8\"" } }
{ dg-final { scan-sarif-file "\"message\": " } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c0>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c1>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f5>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ff>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <c2>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><80><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><9f><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <e0><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ec><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <ed><a0><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><80><80><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f0><8f><bf><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <f4><90><80><80>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <fd><bf><bf><bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character <bf>"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c0>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c1>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f5>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ff>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c2>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><80><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><9f><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ec><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ed><a0><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><80><80><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><8f><bf><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f4><90><80><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<fd><bf><bf><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c0>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c1>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f5>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ff>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<c2>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><80><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><9f><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<e0><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ec><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<ed><a0><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><80><80><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f0><8f><bf><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<f4><90><80><80>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<fd><bf><bf><bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
{ dg-final { scan-sarif-file {"text": "invalid UTF-8 character '<bf>'"} } }
*/

View 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" } */

View 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" } */

View 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

View 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

View 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
@ -34,32 +34,32 @@
#endif
#if 0
#elifdef A // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef A // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#else
#error "#elifdef A did not apply"
#endif
#if 0
#elifndef B // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef B // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#else
#error "#elifndef B did not apply"
#endif
#if 1
#elifdef A // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef A // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
#if 1
#elifndef B // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef B // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
// As with #elif, the syntax of the new directives is relaxed after a
non-skipped group.
#if 1
#elifdef x * y // { dg-warning "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef x * y // { dg-warning "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
#if 1
#elifndef ! // { dg-warning "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef ! // { dg-warning "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif

View 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
@ -34,32 +34,32 @@
#endif
#if 0
#elifdef A // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef A // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#else
#error "#elifdef A did not apply"
#endif
#if 0
#elifndef B // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef B // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#else
#error "#elifndef B did not apply"
#endif
#if 1
#elifdef A // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef A // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
#if 1
#elifndef B // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef B // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
// As with #elif, the syntax of the new directives is relaxed after a
non-skipped group.
#if 1
#elifdef x * y // { dg-error "#elifdef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifdef x * y // { dg-error "'#elifdef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif
#if 1
#elifndef ! // { dg-error "#elifndef before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#elifndef ! // { dg-error "'#elifndef' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } }
#endif

View 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" }
);

View 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" }
);

View 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" } */

View 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 }

View 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 }

View 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

View File

@ -4,40 +4,40 @@
// { dg-options "-finput-charset=UTF-8" }
// a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" }
// a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
// a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
// aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
// aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
// aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
// aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
// aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
// aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
// aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
// að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
// aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
// a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
// a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
// aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
// aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
// aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
// aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
// aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
// aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
// að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
// aô<61>€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
/* a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" } */
/* a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } */
/* a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } */
/* aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } */
/* aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } */
/* aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } */
/* aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } */
/* aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } */
/* aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } */
/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */
/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */
/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } */
/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */
/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */
/* aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */
/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */
/* { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */
/* a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } */
/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } */
/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } */
/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } */
/* aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } */
/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } */
/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } */
/* aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } */
/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */
/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */
/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */
/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */
/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */
/* aô<61>€€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 } */

View File

@ -6,20 +6,20 @@
#define I(x)
I(Âß¿à íŸ¿îð<EFBFBD>ô<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character" }
// { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
I() // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
I(¿) // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
I(À) // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
I(Á) // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
I(õ) // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
I(Â) // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
I(à) // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
I(àŸ) // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
I(ì) // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
I(í ) // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
I(ð) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
I() // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
I(À) // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
I(à) // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
I(àŸ) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
I(ì) // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
I(í ) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
I(ð) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
I(ô<EFBFBD>) // { dg-error "is not valid in an identifier" }
I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" }

View File

@ -6,20 +6,20 @@
#define I(x)
I(Âß¿à íŸ¿îð<EFBFBD>ô<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character" }
// { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
I() // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
I(¿) // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
I(À) // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
I(Á) // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
I(õ) // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
I(ÿ) // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
I(Â) // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
I(à) // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
I(à¿) // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
I(àŸ) // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
I(à¿) // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
I(ì) // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
I(í ) // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
I(ð) // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
I() // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
I(¿) // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
I(À) // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
I(Á) // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
I(õ) // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
I(ÿ) // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
I(Â) // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
I(à) // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
I(à¿) // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
I(àŸ) // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
I(à¿) // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
I(ì) // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
I(í ) // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
I(ð) // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
I(ô<EFBFBD>) // { dg-error "is not valid in an identifier" }
I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" }

View File

@ -6,20 +6,20 @@
#define I(x)
I(Âß¿à íŸ¿îð<EFBFBD>ô<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character" }
// { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
I() // { dg-bogus "invalid UTF-8 character <80>" }
I(¿) // { dg-bogus "invalid UTF-8 character <bf>" }
I(À) // { dg-bogus "invalid UTF-8 character <c0>" }
I(Á) // { dg-bogus "invalid UTF-8 character <c1>" }
I(õ) // { dg-bogus "invalid UTF-8 character <f5>" }
I(ÿ) // { dg-bogus "invalid UTF-8 character <ff>" }
I(Â) // { dg-bogus "invalid UTF-8 character <c2>" }
I(à) // { dg-bogus "invalid UTF-8 character <e0>" }
I(à¿) // { dg-bogus "invalid UTF-8 character <e0><80><bf>" }
I(àŸ) // { dg-bogus "invalid UTF-8 character <e0><9f><80>" }
I(à¿) // { dg-bogus "invalid UTF-8 character <e0><bf>" }
I(ì) // { dg-bogus "invalid UTF-8 character <ec><80>" }
I(í ) // { dg-bogus "invalid UTF-8 character <ed><a0><80>" }
I(ð) // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" }
I(ð<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" }
I() // { dg-bogus "invalid UTF-8 character '<80>" }
I(¿) // { dg-bogus "invalid UTF-8 character '<bf>'" }
I(À) // { dg-bogus "invalid UTF-8 character '<c0>'" }
I(Á) // { dg-bogus "invalid UTF-8 character '<c1>'" }
I(õ) // { dg-bogus "invalid UTF-8 character '<f5>'" }
I(ÿ) // { dg-bogus "invalid UTF-8 character '<ff>'" }
I(Â) // { dg-bogus "invalid UTF-8 character '<c2>'" }
I(à) // { dg-bogus "invalid UTF-8 character '<e0>'" }
I(à¿) // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" }
I(àŸ) // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" }
I(à¿) // { dg-bogus "invalid UTF-8 character '<e0><bf>'" }
I(ì) // { dg-bogus "invalid UTF-8 character '<ec><80>'" }
I(í ) // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" }
I(ð) // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" }
I(ð<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" }
I(ô<EFBFBD>) // { dg-error "is not valid in an identifier" }
I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" }

View File

@ -4,40 +4,40 @@
// { dg-options "-finput-charset=UTF-8 -pedantic" }
// a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" }
// a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
// a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
// aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
// aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
// aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
// aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
// aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
// aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
// aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
// aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
// aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
// aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
// aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
// að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
// að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
// aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
// a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
// a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
// aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
// aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
// aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
// aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
// aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
// aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
// aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
// aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
// aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
// aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
// aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
// að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
// að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
// aô<61>€€a { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
/* a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" } */
/* a€a { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } } */
/* a¿a { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } } */
/* aÀa { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } } */
/* aÁa { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } } */
/* aõa { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } } */
/* aÿa { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } } */
/* aÂa { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } } */
/* aàa { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } } */
/* aà€¿a { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
/* aàŸ€a { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */
/* aà¿a { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */
/* aì€a { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } } */
/* aí €a { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */
/* að€€€a { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */
/* aô<61>€€a { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */
/* aý¿¿¿¿¿a { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */
/* { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */
/* a€a { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } } */
/* a¿a { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } } */
/* aÀa { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } } */
/* aÁa { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } } */
/* aõa { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } } */
/* aÿa { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } } */
/* aÂa { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } } */
/* aàa { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } } */
/* aà€¿a { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
/* aàŸ€a { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */
/* aà¿a { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */
/* aì€a { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */
/* aí €a { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */
/* að€€€a { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
/* að<61>¿¿a { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */
/* aô<61>€€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 } */

View File

@ -4,40 +4,40 @@
// { dg-options "-finput-charset=UTF-8 -pedantic-errors" }
// a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" }
// a€a { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
// a¿a { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
// aÀa { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
// aÁa { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
// aõa { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
// aÿa { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
// aÂa { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
// aàa { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
// aà€¿a { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
// aàŸ€a { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
// aà¿a { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
// aì€a { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
// aí €a { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
// að€€€a { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
// að<61>¿¿a { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
// aô<61>€€a { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
// a€a { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
// a¿a { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
// aÀa { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
// aÁa { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
// aõa { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
// aÿa { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
// aÂa { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
// aàa { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
// aà€¿a { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
// aàŸ€a { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
// aà¿a { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
// aì€a { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
// aí €a { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
// að€€€a { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
// að<61>¿¿a { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
// aô<61>€€a { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
// aý¿¿¿¿¿a { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
/* a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" } */
/* a€a { dg-error "invalid UTF-8 character <80>" "" { target c++23 } } */
/* a¿a { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } } */
/* aÀa { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } } */
/* aÁa { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } } */
/* aõa { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } } */
/* aÿa { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } } */
/* aÂa { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } } */
/* aàa { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } } */
/* aà€¿a { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } } */
/* aàŸ€a { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } } */
/* aà¿a { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } } */
/* aì€a { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } } */
/* aí €a { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } } */
/* að€€€a { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } } */
/* að<61>¿¿a { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } } */
/* aô<61>€€a { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } } */
/* aý¿¿¿¿¿a { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } } */
/* { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 } */
/* a€a { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } } */
/* a¿a { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } } */
/* aÀa { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } } */
/* aÁa { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } } */
/* aõa { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } } */
/* aÿa { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } } */
/* aÂa { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } } */
/* aàa { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } } */
/* aà€¿a { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } } */
/* aàŸ€a { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } } */
/* aà¿a { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } } */
/* aì€a { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } } */
/* aí €a { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } } */
/* að€€€a { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } } */
/* að<61>¿¿a { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } } */
/* aô<61>€€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 } */

View File

@ -4,40 +4,40 @@
// { dg-options "-finput-charset=UTF-8 -pedantic-errors -Wno-invalid-utf8" }
// a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" }
// a€a { dg-bogus "invalid UTF-8 character <80>" }
// a¿a { dg-bogus "invalid UTF-8 character <bf>" }
// aÀa { dg-bogus "invalid UTF-8 character <c0>" }
// aÁa { dg-bogus "invalid UTF-8 character <c1>" }
// aõa { dg-bogus "invalid UTF-8 character <f5>" }
// aÿa { dg-bogus "invalid UTF-8 character <ff>" }
// aÂa { dg-bogus "invalid UTF-8 character <c2>" }
// aàa { dg-bogus "invalid UTF-8 character <e0>" }
// aà€¿a { dg-bogus "invalid UTF-8 character <e0><80><bf>" }
// aàŸ€a { dg-bogus "invalid UTF-8 character <e0><9f><80>" }
// aà¿a { dg-bogus "invalid UTF-8 character <e0><bf>" }
// aì€a { dg-bogus "invalid UTF-8 character <ec><80>" }
// aí €a { dg-bogus "invalid UTF-8 character <ed><a0><80>" }
// að€€€a { dg-bogus "invalid UTF-8 character <f0><80><80><80>" }
// að<61>¿¿a { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" }
// aô<61>€€a { dg-bogus "invalid UTF-8 character <f4><90><80><80>" }
// aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" }
// { dg-bogus "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 }
// a€a { dg-bogus "invalid UTF-8 character '<80>'" }
// a¿a { dg-bogus "invalid UTF-8 character '<bf>'" }
// aÀa { dg-bogus "invalid UTF-8 character '<c0>'" }
// aÁa { dg-bogus "invalid UTF-8 character '<c1>'" }
// aõa { dg-bogus "invalid UTF-8 character '<f5>'" }
// aÿa { dg-bogus "invalid UTF-8 character '<ff>'" }
// aÂa { dg-bogus "invalid UTF-8 character '<c2>'" }
// aàa { dg-bogus "invalid UTF-8 character '<e0>'" }
// aà€¿a { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" }
// aàŸ€a { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" }
// aà¿a { dg-bogus "invalid UTF-8 character '<e0><bf>'" }
// aì€a { dg-bogus "invalid UTF-8 character '<ec><80>'" }
// aí €a { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" }
// að€€€a { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" }
// að<61>¿¿a { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" }
// aô<61>€€a { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" }
// aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" }
// { dg-bogus "invalid UTF-8 character '<bf>'" "" { target *-*-* } .-1 }
/* a€߿ࠀ퟿𐀀􏿿a { dg-bogus "invalid UTF-8 character" } */
/* a€a { dg-bogus "invalid UTF-8 character <80>" } */
/* a¿a { dg-bogus "invalid UTF-8 character <bf>" } */
/* aÀa { dg-bogus "invalid UTF-8 character <c0>" } */
/* aÁa { dg-bogus "invalid UTF-8 character <c1>" } */
/* aõa { dg-bogus "invalid UTF-8 character <f5>" } */
/* aÿa { dg-bogus "invalid UTF-8 character <ff>" } */
/* aÂa { dg-bogus "invalid UTF-8 character <c2>" } */
/* aàa { dg-bogus "invalid UTF-8 character <e0>" } */
/* aà€¿a { dg-bogus "invalid UTF-8 character <e0><80><bf>" } */
/* aàŸ€a { dg-bogus "invalid UTF-8 character <e0><9f><80>" } */
/* aà¿a { dg-bogus "invalid UTF-8 character <e0><bf>" } */
/* aì€a { dg-bogus "invalid UTF-8 character <ec><80>" } */
/* aí €a { dg-bogus "invalid UTF-8 character <ed><a0><80>" } */
/* að€€€a { dg-bogus "invalid UTF-8 character <f0><80><80><80>" } */
/* að<61>¿¿a { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" } */
/* aô<61>€€a { dg-bogus "invalid UTF-8 character <f4><90><80><80>" } */
/* aý¿¿¿¿¿a { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" } */
/* { dg-bogus "invalid UTF-8 character <bf>" "" { target *-*-* } .-1 } */
/* a€a { dg-bogus "invalid UTF-8 character '<80>'" } */
/* a¿a { dg-bogus "invalid UTF-8 character '<bf>'" } */
/* aÀa { dg-bogus "invalid UTF-8 character '<c0>'" } */
/* aÁa { dg-bogus "invalid UTF-8 character '<c1>'" } */
/* aõa { dg-bogus "invalid UTF-8 character '<f5>'" } */
/* aÿa { dg-bogus "invalid UTF-8 character '<ff>'" } */
/* aÂa { dg-bogus "invalid UTF-8 character '<c2>'" } */
/* aàa { dg-bogus "invalid UTF-8 character '<e0>'" } */
/* aà€¿a { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" } */
/* aàŸ€a { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" } */
/* aà¿a { dg-bogus "invalid UTF-8 character '<e0><bf>'" } */
/* aì€a { dg-bogus "invalid UTF-8 character '<ec><80>'" } */
/* aí €a { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" } */
/* að€€€a { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" } */
/* að<61>¿¿a { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" } */
/* aô<61>€€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 } */

View File

@ -3,78 +3,78 @@
// { dg-do preprocess { target c++11 } }
// { dg-options "-finput-charset=UTF-8" }
char32_t a = U''; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
char32_t a = U''; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A = U"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B = U""; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B = U""; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A1 = UR"(€߿ࠀ퟿𐀀􏿿)"; // { dg-bogus "invalid UTF-8 character" }
auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A2 = u8"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B2 = u8""; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B2 = u8""; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { 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 }

View File

@ -3,78 +3,78 @@
// { dg-do preprocess { target c++11 } }
// { dg-options "-finput-charset=UTF-8 -pedantic" }
char32_t a = U''; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
char32_t a = U''; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
char32_t b = U'¿'; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
char32_t c = U'À'; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
char32_t d = U'Á'; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
char32_t e = U'õ'; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
char32_t g = U'Â'; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
char32_t h = U'à'; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
char32_t l = U'ì'; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
char32_t m = U'í '; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
char32_t n = U'ð'; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A = U"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B = U""; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C = U"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D = U"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E = U"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F = U"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H = U"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I = U"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L = U"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M = U"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N = U"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B = U""; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C = U"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D = U"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E = U"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F = U"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G = U"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H = U"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I = U"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J = U"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L = U"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M = U"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N = U"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A1 = UR"(€߿ࠀ퟿𐀀􏿿)"; // { dg-bogus "invalid UTF-8 character" }
auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B1 = UR"(€)"; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-warning "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-warning "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A2 = u8"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B2 = u8""; // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { dg-warning "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R2 = u8"ý¿¿¿¿¿"; // { dg-warning "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B2 = u8""; // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D2 = u8"À"; // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I2 = u8"à"; // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { 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 }

View File

@ -3,78 +3,78 @@
// { dg-do preprocess { target c++11 } }
// { dg-options "-finput-charset=UTF-8 -pedantic-errors" }
char32_t a = U''; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
char32_t b = U'¿'; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
char32_t c = U'À'; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
char32_t d = U'Á'; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
char32_t e = U'õ'; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
char32_t g = U'Â'; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
char32_t h = U'à'; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
char32_t l = U'ì'; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
char32_t m = U'í '; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
char32_t n = U'ð'; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
char32_t a = U''; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
char32_t b = U'¿'; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
char32_t c = U'À'; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
char32_t d = U'Á'; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
char32_t e = U'õ'; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
char32_t g = U'Â'; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
char32_t h = U'à'; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
char32_t l = U'ì'; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
char32_t m = U'í '; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
char32_t n = U'ð'; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A = U"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B = U""; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
auto C = U"¿"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D = U"À"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E = U"Á"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F = U"õ"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G = U"ÿ"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H = U"Â"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I = U"à"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J = U"à€¿"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L = U"à¿"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M = U"ì€"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N = U"í €"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B = U""; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C = U"¿"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D = U"À"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E = U"Á"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F = U"õ"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G = U"ÿ"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H = U"Â"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I = U"à"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J = U"à€¿"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L = U"à¿"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M = U"ì€"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N = U"í €"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A1 = UR"(€߿ࠀ퟿𐀀􏿿)"; // { dg-bogus "invalid UTF-8 character" }
auto B1 = UR"(€)"; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B1 = UR"(€)"; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-error "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-error "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A2 = u8"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B2 = u8""; // { dg-error "invalid UTF-8 character <80>" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D2 = u8"À"; // { dg-error "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-error "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-error "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-error "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-error "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I2 = u8"à"; // { dg-error "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-error "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-error "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-error "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-error "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-error "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-error "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-error "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { dg-error "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R2 = u8"ý¿¿¿¿¿"; // { dg-error "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-error "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B2 = u8""; // { dg-error "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-error "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D2 = u8"À"; // { dg-error "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-error "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-error "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-error "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-error "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I2 = u8"à"; // { dg-error "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-error "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-error "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-error "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-error "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-error "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-error "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-error "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { 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 }

View 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''; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } }
char32_t b = U'¿'; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } }
char32_t c = U'À'; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } }
char32_t d = U'Á'; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } }
char32_t e = U'õ'; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } }
char32_t g = U'Â'; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } }
char32_t h = U'à'; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
char32_t l = U'ì'; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } }
char32_t m = U'í '; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
char32_t n = U'ð'; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
char32_t a = U''; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } }
char32_t b = U'¿'; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } }
char32_t c = U'À'; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } }
char32_t d = U'Á'; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } }
char32_t e = U'õ'; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } }
char32_t f = U'ÿ'; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } }
char32_t g = U'Â'; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } }
char32_t h = U'à'; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } }
char32_t i = U'à¿'; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
char32_t j = U'àŸ'; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
char32_t k = U'à¿'; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
char32_t l = U'ì'; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
char32_t m = U'í '; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
char32_t n = U'ð'; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
char32_t o = U'ð<EFBFBD>¿¿'; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
char32_t p = U'ô<EFBFBD>'; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
char32_t q = U'ý¿¿¿¿¿'; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A = U"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B = U""; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } }
auto C = U"¿"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D = U"À"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E = U"Á"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F = U"õ"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G = U"ÿ"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H = U"Â"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I = U"à"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J = U"à€¿"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L = U"à¿"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M = U"ì€"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N = U"í €"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B = U""; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C = U"¿"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D = U"À"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E = U"Á"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F = U"õ"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G = U"ÿ"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H = U"Â"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I = U"à"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J = U"à€¿"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K = U"àŸ€"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L = U"à¿"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M = U"ì€"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N = U"í €"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O = U"ð€€€"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P = U"ð<EFBFBD>¿¿"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q = U"ô<EFBFBD>€€"; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R = U"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A1 = UR"(€߿ࠀ퟿𐀀􏿿)"; // { dg-bogus "invalid UTF-8 character" }
auto B1 = UR"(€)"; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B1 = UR"(€)"; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C1 = UR"(¿)"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D1 = UR"(À)"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E1 = UR"(Á)"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F1 = UR"(õ)"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G1 = UR"(ÿ)"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H1 = UR"(Â)"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I1 = UR"(à)"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J1 = UR"(à€¿)"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K1 = UR"(àŸ€)"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L1 = UR"(à¿)"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M1 = UR"(ì€)"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N1 = UR"(í €)"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O1 = UR"(ð€€€)"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P1 = UR"<>¿¿)"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q1 = UR"<>€€)"; // { dg-bogus "invalid UTF-8 character '<f4><90><80><80>'" "" { target c++23 } }
auto R1 = UR"(ý¿¿¿¿¿)"; // { dg-bogus "invalid UTF-8 character '<fd><bf><bf><bf>'" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } .-1 }
auto A2 = u8"€߿ࠀ퟿𐀀􏿿"; // { dg-bogus "invalid UTF-8 character" }
auto B2 = u8""; // { dg-bogus "invalid UTF-8 character <80>" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } }
auto D2 = u8"À"; // { dg-bogus "invalid UTF-8 character <c0>" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-bogus "invalid UTF-8 character <c1>" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-bogus "invalid UTF-8 character <f5>" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-bogus "invalid UTF-8 character <ff>" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-bogus "invalid UTF-8 character <c2>" "" { target c++23 } }
auto I2 = u8"à"; // { dg-bogus "invalid UTF-8 character <e0>" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-bogus "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-bogus "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-bogus "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-bogus "invalid UTF-8 character <ec><80>" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-bogus "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-bogus "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-bogus "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { dg-bogus "invalid UTF-8 character <f4><90><80><80>" "" { target c++23 } }
auto R2 = u8"ý¿¿¿¿¿"; // { dg-bogus "invalid UTF-8 character <fd><bf><bf><bf>" "" { target c++23 } }
// { dg-bogus "invalid UTF-8 character <bf>" "" { target c++23 } .-1 }
auto B2 = u8""; // { dg-bogus "invalid UTF-8 character '<80>'" "" { target c++23 } }
auto C2 = u8"¿"; // { dg-bogus "invalid UTF-8 character '<bf>'" "" { target c++23 } }
auto D2 = u8"À"; // { dg-bogus "invalid UTF-8 character '<c0>'" "" { target c++23 } }
auto E2 = u8"Á"; // { dg-bogus "invalid UTF-8 character '<c1>'" "" { target c++23 } }
auto F2 = u8"õ"; // { dg-bogus "invalid UTF-8 character '<f5>'" "" { target c++23 } }
auto G2 = u8"ÿ"; // { dg-bogus "invalid UTF-8 character '<ff>'" "" { target c++23 } }
auto H2 = u8"Â"; // { dg-bogus "invalid UTF-8 character '<c2>'" "" { target c++23 } }
auto I2 = u8"à"; // { dg-bogus "invalid UTF-8 character '<e0>'" "" { target c++23 } }
auto J2 = u8"à€¿"; // { dg-bogus "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
auto K2 = u8"àŸ€"; // { dg-bogus "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
auto L2 = u8"à¿"; // { dg-bogus "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
auto M2 = u8"ì€"; // { dg-bogus "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
auto N2 = u8"í €"; // { dg-bogus "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
auto O2 = u8"ð€€€"; // { dg-bogus "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
auto P2 = u8"ð<EFBFBD>¿¿"; // { dg-bogus "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
auto Q2 = u8"ô<EFBFBD>€€"; // { 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 }

View File

@ -6,20 +6,20 @@
#define I(x)
I(Âß¿à íŸ¿îð<EFBFBD>ô<EFBFBD>¿¿) // { dg-bogus "invalid UTF-8 character" }
// { dg-error "is not valid in an identifier" "" { target *-*-* } .-1 }
I() // { dg-warning "invalid UTF-8 character <80>" "" { target c++23 } }
I(¿) // { dg-warning "invalid UTF-8 character <bf>" "" { target c++23 } }
I(À) // { dg-warning "invalid UTF-8 character <c0>" "" { target c++23 } }
I(Á) // { dg-warning "invalid UTF-8 character <c1>" "" { target c++23 } }
I(õ) // { dg-warning "invalid UTF-8 character <f5>" "" { target c++23 } }
I(ÿ) // { dg-warning "invalid UTF-8 character <ff>" "" { target c++23 } }
I(Â) // { dg-warning "invalid UTF-8 character <c2>" "" { target c++23 } }
I(à) // { dg-warning "invalid UTF-8 character <e0>" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><80><bf>" "" { target c++23 } }
I(àŸ) // { dg-warning "invalid UTF-8 character <e0><9f><80>" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character <e0><bf>" "" { target c++23 } }
I(ì) // { dg-warning "invalid UTF-8 character <ec><80>" "" { target c++23 } }
I(í ) // { dg-warning "invalid UTF-8 character <ed><a0><80>" "" { target c++23 } }
I(ð) // { dg-warning "invalid UTF-8 character <f0><80><80><80>" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character <f0><8f><bf><bf>" "" { target c++23 } }
I() // { dg-warning "invalid UTF-8 character '<80>'" "" { target c++23 } }
I(¿) // { dg-warning "invalid UTF-8 character '<bf>'" "" { target c++23 } }
I(À) // { dg-warning "invalid UTF-8 character '<c0>'" "" { target c++23 } }
I(Á) // { dg-warning "invalid UTF-8 character '<c1>'" "" { target c++23 } }
I(õ) // { dg-warning "invalid UTF-8 character '<f5>'" "" { target c++23 } }
I(ÿ) // { dg-warning "invalid UTF-8 character '<ff>'" "" { target c++23 } }
I(Â) // { dg-warning "invalid UTF-8 character '<c2>'" "" { target c++23 } }
I(à) // { dg-warning "invalid UTF-8 character '<e0>'" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><80><bf>'" "" { target c++23 } }
I(àŸ) // { dg-warning "invalid UTF-8 character '<e0><9f><80>'" "" { target c++23 } }
I(à¿) // { dg-warning "invalid UTF-8 character '<e0><bf>'" "" { target c++23 } }
I(ì) // { dg-warning "invalid UTF-8 character '<ec><80>'" "" { target c++23 } }
I(í ) // { dg-warning "invalid UTF-8 character '<ed><a0><80>'" "" { target c++23 } }
I(ð) // { dg-warning "invalid UTF-8 character '<f0><80><80><80>'" "" { target c++23 } }
I(ð<EFBFBD>¿¿) // { dg-warning "invalid UTF-8 character '<f0><8f><bf><bf>'" "" { target c++23 } }
I(ô<EFBFBD>) // { dg-error "is not valid in an identifier" }
I(ý¿¿¿¿¿) // { dg-error "is not valid in an identifier" }

View 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 }

View 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 }

View 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 }

View 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 }

View 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)
{

View 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" } */
}

View 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. */

View 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 /\

View 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 } */

View 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 } */

View 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 } */

View 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

View 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 } */

View 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__

View 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__

View 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 } */

View 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

View 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

View 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
@ -34,32 +34,32 @@
#endif
#if 0
#elifdef A /* { dg-warning "#elifdef before C23 is a GCC extension" } */
#elifdef A /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */
#else
#error "#elifdef A did not apply"
#endif
#if 0
#elifndef B /* { dg-warning "#elifndef before C23 is a GCC extension" } */
#elifndef B /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */
#else
#error "#elifndef B did not apply"
#endif
#if 1
#elifdef A /* { dg-warning "#elifdef before C23 is a GCC extension" } */
#elifdef A /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */
#endif
#if 1
#elifndef B /* { dg-warning "#elifndef before C23 is a GCC extension" } */
#elifndef B /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */
#endif
/* As with #elif, the syntax of the new directives is relaxed after a
non-skipped group. */
#if 1
#elifdef x * y /* { dg-warning "#elifdef before C23 is a GCC extension" } */
#elifdef x * y /* { dg-warning "'#elifdef' before C23 is a GCC extension" } */
#endif
#if 1
#elifndef ! /* { dg-warning "#elifndef before C23 is a GCC extension" } */
#elifndef ! /* { dg-warning "'#elifndef' before C23 is a GCC extension" } */
#endif

View 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
@ -34,32 +34,32 @@
#endif
#if 0
#elifdef A /* { dg-error "#elifdef before C23 is a GCC extension" } */
#elifdef A /* { dg-error "'#elifdef' before C23 is a GCC extension" } */
#else
#error "#elifdef A did not apply"
#endif
#if 0
#elifndef B /* { dg-error "#elifndef before C23 is a GCC extension" } */
#elifndef B /* { dg-error "'#elifndef' before C23 is a GCC extension" } */
#else
#error "#elifndef B did not apply"
#endif
#if 1
#elifdef A /* { dg-error "#elifdef before C23 is a GCC extension" } */
#elifdef A /* { dg-error "'#elifdef' before C23 is a GCC extension" } */
#endif
#if 1
#elifndef B /* { dg-error "#elifndef before C23 is a GCC extension" } */
#elifndef B /* { dg-error "'#elifndef' before C23 is a GCC extension" } */
#endif
/* As with #elif, the syntax of the new directives is relaxed after a
non-skipped group. */
#if 1
#elifdef x * y /* { dg-error "#elifdef before C23 is a GCC extension" } */
#elifdef x * y /* { dg-error "'#elifdef' before C23 is a GCC extension" } */
#endif
#if 1
#elifndef ! /* { dg-error "#elifndef before C23 is a GCC extension" } */
#elifndef ! /* { dg-error "'#elifndef' before C23 is a GCC extension" } */
#endif

View 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 } */

View 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 } */

View 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 } */

View 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 } */

View 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" } */

View 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" } */

View 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. */

View 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

View 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 }

View 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 }

View 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 }

View 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." }

View 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." }

View 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

View 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

View 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

View 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

View 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=." }

View 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=." }

View 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=." }

View 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
^~~~~~~~~~~~~~~~~~~~~~~~~

View 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
^~~~~~~~~~~~~~~~~~~~~

View 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 }

View 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 }

View 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." }

View 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." }

View 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." }

Some files were not shown because too many files have changed in this diff Show More