[Bug libstdc++/83662] std::aligned_alloc() not available

2023-08-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #14 from Jonathan Wakely  ---
This bug report is only about declaring it in namespace std if it's already
available in the global namespace in stdlib.h

If your OS doesn't provide it in stdlib.h then that's not a gcc bug, and
libstdc++ can't add 'using ::aligned_alloc;' to cstdlib.

[Bug libstdc++/83662] std::aligned_alloc() not available

2023-08-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #13 from Jonathan Wakely  ---
Snow Leopard is *ancient*, it didn't support aligned_alloc. According to Bug
92143 you need macOS 10.15 i.e. Catalina.

[Bug libstdc++/83662] std::aligned_alloc() not available

2023-08-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #12 from Jonathan Wakely  ---
See Bug 69680

[Bug libstdc++/83662] std::aligned_alloc() not available

2023-08-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #11 from Andrew Pinski  ---
(In reply to Sergey Fedorov from comment #10)
> I just got the same error with gcc 12.3.0:
> https://github.com/kokkos/kokkos/issues/6367

This should be filed seperately as it is a darwin target specific issue; most
likely just powerpc darwin (Mac OS X) which is likely not as well supported as
x86_64 darwin ...

[Bug libstdc++/83662] std::aligned_alloc() not available

2023-08-17 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #10 from Sergey Fedorov  ---
I just got the same error with gcc 12.3.0:
https://github.com/kokkos/kokkos/issues/6367

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_kokkos/kokkos-devel/work/kokkos-ca3687e637c12225e824ee626e69fc9fea8cebd2/core/src/impl/Kokkos_HostSpace.cpp:
In member function 'void* Kokkos::HostSpace::impl_allocate(const char*, size_t,
size_t, Kokkos::Tools::SpaceHandle) const':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_kokkos/kokkos-devel/work/kokkos-ca3687e637c12225e824ee626e69fc9fea8cebd2/core/src/impl/Kokkos_HostSpace.cpp:95:16:
error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'?
   95 | ptr = std::aligned_alloc(alignment, size);
  |^
  |aligned_union
make[2]: *** [core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_HostSpace.cpp.o]
Error 1
make[2]: *** Waiting for unfinished jobs

Passing -std=c++17 does not help.

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-03-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Jonathan Wakely  ---
Fixed for 7.4

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-03-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Mon Mar 12 23:32:30 2018
New Revision: 258469

URL: https://gcc.gnu.org/viewcvs?rev=258469=gcc=rev
Log:
PR libstdc++/84773 use aligned alloc functions for FreeBSD and MinGW
cross-compilers

PR libstdc++/84773
PR libstdc++/83662
* crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
* configure: Regenerate.
* include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
(aligned_alloc): Add using-declaration.
* testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.

Added:
branches/gcc-7-branch/libstdc++-v3/testsuite/18_support/aligned_alloc/
   
branches/gcc-7-branch/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/configure
branches/gcc-7-branch/libstdc++-v3/crossconfig.m4
branches/gcc-7-branch/libstdc++-v3/include/c_global/cstdlib

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-03-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |7.4

--- Comment #7 from Jonathan Wakely  ---
std::aligned_alloc is now available when ::aligned_alloc is provided by libc.

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-03-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #6 from Jonathan Wakely  ---
Author: redi
Date: Mon Mar 12 22:52:16 2018
New Revision: 258468

URL: https://gcc.gnu.org/viewcvs?rev=258468=gcc=rev
Log:
PR libstdc++/84773 use aligned alloc functions for FreeBSD and MinGW
cross-compilers

PR libstdc++/84773
PR libstdc++/83662
* crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
* configure: Regenerate.
* include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
(aligned_alloc): Add using-declaration.
* testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/18_support/aligned_alloc/
trunk/libstdc++-v3/testsuite/18_support/aligned_alloc/aligned_alloc.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/configure
trunk/libstdc++-v3/crossconfig.m4
trunk/libstdc++-v3/include/c_global/cstdlib

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-03-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-01-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #5 from Jonathan Wakely  ---
Adding this is simple, but I'm worried it will cause issues on Windows, where
detection of that function doesn't seem to work properly (see PR 78565).

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-01-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-25
 CC|jwakely.gcc at gmail dot com   |
 Ever confirmed|0   |1

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-01-25 Thread david.abdurachmanov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

David Abdurachmanov  changed:

   What|Removed |Added

 CC||david.abdurachmanov at gmail 
dot c
   ||om, jwakely.gcc at gmail dot 
com

--- Comment #4 from David Abdurachmanov  
---
I hit the same issue on a few days old build of GCC 7 (close to 7.3.0) while
compiling a file with -std=c++17 / -std=c++1z.

vecgeom-v00.05.00/USolids/../base/Global.h:39:31: error: 'aligned_alloc' is not
a member of 'std'

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-01-03 Thread nico at josuttis dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #3 from Nicolai Josuttis  ---
See for example here:
https://wandbox.org/permlink/aOV13KmAUMKzSmxz

[Bug libstdc++/83662] std::aligned_alloc() not available

2018-01-03 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

--- Comment #2 from Andrew Pinski  ---
Just to make sure what options are you using to compile the program?