Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

More correctly detect the presence of aligned/sized new/delete. #1055

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

griwes
Copy link
Collaborator

@griwes griwes commented Feb 13, 2020

This fixes a problem with the interaction of Clang and libstdc++'s operator new overloads.

Also do some drive-by fixes to make sure everything compiles cleanly with Clang and C++17.

Internal bug 2843412.
Internal P4 shelved change.

It seems that the issue is caused by libstdc++ using __cpp_sized_deallocation, with Clang not predefining it unless requested by a flag (https://releases.llvm.org/3.7.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags) (why in the world would they do it this particular way, i.e. opt in and not opt out, and why in the world would they still hide it behind an opt-in flag, is completely beyond me).

This fixes a problem with the interaction of Clang and libstdc++'s
operator new overloads.

Also do some drive-by fixes to make sure everything compiles cleanly
with Clang and C++17.

Bug 2843412
Copy link
Collaborator

@alliepiper alliepiper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@griwes griwes merged commit 6b5eb85 into master Feb 14, 2020
@griwes griwes deleted the bug/nvidia/clang-sized-aligned-delete-2843412 branch February 14, 2020 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants