[Bug c++/80077] New: constant expressions and -fno-elide-constructors
kaballo86 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 17 00:57:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80077
Bug ID: 80077
Summary: constant expressions and -fno-elide-constructors
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kaballo86 at hotmail dot com
Target Milestone: ---
The following snippet, extracted from libstdc++, causes the compiler to
generate an error when compiled using -fno-elide-constructors under C++11/14:
/// piecewise_construct_t
struct piecewise_construct_t { explicit piecewise_construct_t() = default;
};
/// piecewise_construct
constexpr piecewise_construct_t piecewise_construct =
piecewise_construct_t();
// error: modification of 'piecewise_construct' is not a constant
expression
This appears to be a regression from 6.3.0.
More information about the Gcc-bugs
mailing list