public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103087] New: "using enum" possibly incorrectly accepted
@ 2021-11-04 17:46 terra at gnome dot org
  2021-11-04 17:50 ` [Bug c++/103087] " mpolacek at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: terra at gnome dot org @ 2021-11-04 17:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103087

            Bug ID: 103087
           Summary: "using enum" possibly incorrectly accepted
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: terra at gnome dot org
  Target Milestone: ---

See https://bugs.llvm.org/show_bug.cgi?id=52403

enum class Pig { Oink };
using Hog = Pig;
using enum Hog;

gcc 11.1 accepts this code.  clang13 does not.

https://en.cppreference.com/w/cpp/language/enum suggests this should be valid.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1099r5.html suggests
it should be valid.

http://eel.is/c++draft/enum.udecl suggests invalid.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/103087] "using enum" possibly incorrectly accepted
  2021-11-04 17:46 [Bug c++/103087] New: "using enum" possibly incorrectly accepted terra at gnome dot org
@ 2021-11-04 17:50 ` mpolacek at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-11-04 17:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103087

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Dup.

*** This bug has been marked as a duplicate of bug 103084 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-04 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 17:46 [Bug c++/103087] New: "using enum" possibly incorrectly accepted terra at gnome dot org
2021-11-04 17:50 ` [Bug c++/103087] " mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).