Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

clang accepts 'enum struct' in C mode with warning despite being unusable #42372

Closed
Labels
bugzillaIssues migrated from bugzillacclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party
@llvmbot

Description

@llvmbot
Bugzilla Link43027
Versiontrunk
OSAll
ReporterLLVM Bugzilla Contributor
CC@WonHoYoo,@DougGregor,@garfr,@zygoloid

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillacclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp