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

Appearance settings

[Clang] -Wmissing-constinit triggers when the suggested change causes compilation error #140203

Copy link
Copy link
Open
@horenmar

Description

@horenmar
Issue body actions

I have a header that declares a constinit const array, and a cpp file that initializes it with constexpr (because I want to be able to use it in further constexpr functions in that cpp file).

This triggers -Wmissing-constinit pointed at the initializing declaration, together with a suggestion to add constinit to the declaration. However, doing so leads to a compilation error, because constexpr and constinit cannot be combined on a single declaration.

CE link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.