Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<yvals_core.h>: Conformance issue on [[msvc::known_semantics]] #2645

Closed
frederick-vs-ja opened this issue Apr 11, 2022 · 2 comments · Fixed by #2649 or #3760
Closed

<yvals_core.h>: Conformance issue on [[msvc::known_semantics]] #2645

frederick-vs-ja opened this issue Apr 11, 2022 · 2 comments · Fixed by #2649 or #3760
Labels
bug Something isn't working fixed Something works now, yay!

Comments

@frederick-vs-ja
Copy link
Contributor

msvc and known_semantics are not reserved identifiers in the C++ Standard, so users are allowed to #define them to anything, which may break every header that directly uses [[msvc::known_semantics]] (e.g. <type_traits>).

IIUC the Standard equivalently requires that every non-Standard attribute used in a Standard header to be spelled in reserved identifiers, e.g. [[__msvc__::__known_semantics__]]. Does MSVC support such spelling?

@CaseyCarter CaseyCarter added the bug Something isn't working label Apr 12, 2022
CaseyCarter added a commit to CaseyCarter/STL that referenced this issue Apr 12, 2022
Define `_MSVC_MEOW` macro in `<yvals_core.h>`for each `[[msvc::meow]]` custom attribute with surrounding push_macro/pop_macro guards.

Fixes microsoft#2645
@StephanTLavavej StephanTLavavej added the fixed Something works now, yay! label Apr 16, 2022
@frederick-vs-ja
Copy link
Contributor Author

This issue seems not correctly fixed (llvm/llvm-project#61196 (comment)).

@CaseyCarter
Copy link
Member

Per Discord discussion, we should probably give up battling the preprocessor and just have the compiler front end implement ugly equivalents of the pertinent attributes.

@CaseyCarter CaseyCarter reopened this Mar 8, 2023
@CaseyCarter CaseyCarter removed the fixed Something works now, yay! label Mar 8, 2023
@StephanTLavavej StephanTLavavej added the fixed Something works now, yay! label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Something works now, yay!
Projects
None yet
3 participants