Page MenuHomePhabricator

Don't warn about selectany on implicitly inline variables
ClosedPublic

Authored by rnk on Tue, Sep 10, 5:47 PM.

Details

Summary

This avoids a -Wignored-attribute warning on the code pattern Microsoft
recommends for integral const static data members defined in headers
here:
https://docs.microsoft.com/en-us/cpp/build/reference/microsoft-extensions-to-c-and-cpp?view=vs-2019

The attribute is redundant, but it is necessary when compiling in C++14
modes with /Za, which disables MSVC's extension that treats such
variables as implicitly inline.

Fixes PR43270

Diff Detail

Event Timeline

rnk created this revision.Tue, Sep 10, 5:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Sep 10, 5:47 PM
epastor accepted this revision.Thu, Sep 12, 7:09 AM
This revision is now accepted and ready to land.Thu, Sep 12, 7:09 AM
This revision was automatically updated to reflect the committed changes.