https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125580
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-06-03
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Something like this:
```
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 03b1ea17683..329ff9b343e 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -7173,9 +7173,13 @@ cp_parser_primary_expression (cp_parser *parser,
case CPP_XOR:
if (cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_XOR)
{
- error_at (token->location,
- "reflection is only available in C++26 with "
- "%<-freflection%>");
+ if (flag_reflection)
+ error_at (token->location,
+ "%<^^%> requires no whitespace between the two %<^%>");
+ else
+ error_at (token->location,
+ "reflection is only available in C++26 with "
+ "%<-freflection%>");
return error_mark_node;
}
gcc_fallthrough ();
```