https://bugs.llvm.org/show_bug.cgi?id=46645
Richard Smith <richard-l...@metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
> This code, test.cc, line 1 and 2 equals to line 3 (right?).
They're approximately the same, but not entirely the same. The C++ rules don't
permit a type definition to appear in a return type, so line 3 is invalid, as
Clang and GCC report.
> So is this a Clang's accept-invalid bug or GCC's reject-valid?
This is a GCC rejects-valid bug. There's nothing wrong with line 2, and GCC's
diagnostic says that "class" was used when naming the union, which is obviously
wrong -- the keyword "class" does not appear in your example at all.
Even weirder: GCC gives a different diagnostic if you replace 'typename' with
'class'!
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs