-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<functional>
: is compatible with /Zc:alignedNew-
now
#2712
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about changing existing code to rely on C++17 mode
cl defines |
This comment was marked as resolved.
This comment was marked as resolved.
No, it doesn't compile as far as I can see.
only with So every |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok then I agree
This is a separate issue, which should be handled in a separate PR (if at all). Feel free to report upstream to the clang-cl devs that cl ignores |
I created: LLVM-55389 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an opinion on the testing changes (though they seem reasonable to me), and this makes the existing situation better; there may be some discussion left to be had wrt how we want to test /Zc:alignedNew-
.
FYI @strega-nil-ms I pushed minor changes after you approved. I was initially concerned about mismatch - adding |
This comment was marked as outdated.
This comment was marked as outdated.
Hello, The ideal solution for me would be to add a compiler switch
In other words, implement a switch symmetric to Clang's -fnew-alignment. See Add compiler switch to change STDCPP_DEFAULT_NEW_ALIGNMENT. Some background:
This is a fantastic new C++17 feature allowing over-aligned types to be dynamically allocated. Ideally I would like this feature enabled, rather than disabling it using Consider allocation of a 256 byte type, with 128 byte alignment, by default without
The goal is to eliminate this runtime overhead. While the runtime overhead within the overloaded overaligned new/delete can be somewhat mitigated using
This bloats each over-aligned Ideally we want this:
Best Regards, |
We talked about this at the weekly maintainer meeting - we believe that this PR should be changed to follow the same strategy as the rest of the STL currently uses for |
I'm speculatively mirroring this to the MSVC-internal repo - further changes can be pushed, but please notify me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied my suggested changes after testing locally.
Thanks for aligning these new features with our existing tolerance of this option! 😹 🚀 🎉 |
) Co-authored-by: Stephan T. Lavavej <[email protected]> Co-authored-by: Casey Carter <[email protected]>
fixes #2711
I also found that:
works differently on
cl.exe
andclang-cl.exe
this is why I replaced all
to
Should I report about it to LLVM and add "Transition" comment?