-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
[devkitPPC] ::aligned_alloc is available, but not std::aligned_alloc #4
Comments
The same error occurs for me on linux, mingw64 and macOS with both g++ and clang suggesting this usage isn't portable. Where is this a problem? |
Further investigation shows -std=c++17 is necessary for my linux & macOS compilers to compile this test code
Still won't work with mingw64 and, from what I can see here, won't work with other newlib based toolchains without patching. I do have a fix for this though which I'll apply for next release. |
From inspecting the libstdc++v3 configuration scripts, I think it's simply missing a |
Here during overload resolution we have two strictly viable ambiguous candidates devkitPro#1 and devkitPro#2, and two non-strictly viable candidates gcc-mirror#3 and devkitPro#4 which we hold on to ever since r14-6522. These latter candidates have an empty second arg conversion since the first arg conversion was deemed bad, and this trips up joust when called on gcc-mirror#3 and devkitPro#4 which assumes all arg conversions are there. We can fix this by making joust robust to empty arg conversions, but in this situation we shouldn't need to compare gcc-mirror#3 and devkitPro#4 at all given that we have a strictly viable candidate. To that end, this patch makes tourney shortcut considering non-strictly viable candidates upon encountering ambiguity between two strictly viable candidates (taking advantage of the fact that the candidates list is sorted according to viability via splice_viable). PR c++/115239 gcc/cp/ChangeLog: * call.cc (tourney): Don't consider a non-strictly viable candidate as the champ if there was ambiguity between two strictly viable candidates. gcc/testsuite/ChangeLog: * g++.dg/overload/error7.C: New test. Reviewed-by: Jason Merrill <[email protected]> (cherry picked from commit 7fed7e9)
I'm reporting this here, since the gcc repo doesn't allow submitting issues.
In
devkitPPC/powerpc-eabi/include/c++/13.2.0/powerpc-eabi/bits/c++config.h
, the_GLIBCXX_HAVE_ALIGNED_ALLOC
macro is not defined, and that prevents the C functionaligned_alloc()
to be imported into the std namespace for C++ (incstdlib
).This code compiles:
but this doesn't:
The text was updated successfully, but these errors were encountered: