https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78434
Bug ID: 78434
Summary: Incorrect warning about missing align_val_t for
placement new
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marc.mutz at kdab dot com
Target Milestone: ---
GCC incorrectly warns about a missing std::align_val_t argument on a
placement-new expression:
qtbase-5.6/src/corelib/tools/qvector.h:663:5: warning: ‘new’ of type
‘Aligned128’ with extended alignment 128 [-Waligned-new=]
new (d->end()) T(std::move(t));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qtbase-5.6/src/corelib/tools/qvector.h:663:5: note: uses ‘void* operator
new(std::size_t, void*)’, which does not have an alignment parameter
qtbase-5.6/src/corelib/tools/qvector.h:663:5: note: use ‘-faligned-new’ to
enable C++17 over-aligned new support
This is with g++ -v
Using built-in specs.
COLLECT_GCC=/d/gcc/trunk/bin/g++
COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/d/gcc/trunk
--enable-checking=release --enable-languges=c,c++,fortran,lto,objc,obj-c++
Thread model: posix
gcc version 7.0.0 20161005 (experimental) (GCC)