[llvm-bugs] [Bug 43027] New: clang accepts 'enum struct' in C mode with warning despite being unusable

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 17 09:12:37 PDT 2019


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

            Bug ID: 43027
           Summary: clang accepts 'enum struct' in C mode with warning
                    despite being unusable
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: husseydevin at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

In C mode, Clang accepts this code with a warning:

enum struct Foo {
    A
};

However, it is useless. None of the members seem to be accessible. 

I've tried typedefs, ::, :, ., ->, casts, but nothing seems to allow me to
access A. 

Either these should be allowed as a documented extension with ::, or treated as
a syntax error.

-- 
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/20190817/a07cced5/attachment.html>


More information about the llvm-bugs mailing list