[llvm-bugs] [Bug 24297] Clang accepts program with ill-formed enum syntax.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 10 13:23:14 PDT 2020


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
 Fixed By Commit(s)|                            |d6425e2c14370ecb5e2a4be4cfd
                   |                            |ef65f8ae69bd0

--- Comment #2 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Remaining cases diagnosed in commit d6425e2c14370ecb5e2a4be4cfdef65f8ae69bd0.

<stdin>:1:8: error: reference to enumeration must use 'enum' not 'enum struct'
[-Welaborated-enum-class]
  enum struct E a;
       ^~~~~~~
<stdin>:2:8: error: reference to enumeration must use 'enum' not 'enum class'
[-Welaborated-enum-class]
  enum class F b;
       ^~~~~~
<stdin>:3:10: error: non-defining declaration of enumeration with a fixed
underlying type is only permitted as a standalone declaration; missing list of
enumerators? [-Welaborated-enum-base]
  enum G : int c;
         ^~~~~
<stdin>:4:17: error: non-defining declaration of enumeration with a fixed
underlying type is only permitted as a standalone declaration; missing list of
enumerators? [-Welaborated-enum-base]
  enum struct H : int d;
                ^~~~~
<stdin>:5:16: error: non-defining declaration of enumeration with a fixed
underlying type is only permitted as a standalone declaration; missing list of
enumerators? [-Welaborated-enum-base]
  enum class I : int e;
               ^~~~~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200510/bb105c71/attachment.html>


More information about the llvm-bugs mailing list