https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83469
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This is because
cp_parser_check_class_key (enum tag_types class_key, tree type)
{
if (type == error_mark_node)
return;
if ((TREE_CODE (type) == UNION_TYPE) != (class_key == union_type))
{
if (permerror (input_location, "%qs tag used in naming %q#T",
class_key == union_type ? "union"
: class_key == record_type ? "struct" : "class",
type))
where
(gdb) p type
$4 = <typename_type 0x7ffff0035348 U>
(gdb) p class_key
$5 = union_type
Should we allow such a combination?