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.
  • [Bug c++/103087] New: "using... terra at gnome dot org via Gcc-bugs

Reply via email to