[Bug c++/83912] New: [constexpr] struct with a pointer to one of its members, returned by a function, is not a constant expression

2018-01-16 Thread giu.campana at gmail dot com
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: giu.campana at gmail dot com Target Milestone: --- Created attachment 43159 --> https://gcc.gnu.org/bugzi

[Bug c++/83912] [constexpr] struct with a pointer to one of its members, returned by a function, is not a constant expression

2018-01-18 Thread giu.campana at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83912 --- Comment #3 from Giuseppe Campana --- The snippet showed by DR2022 (http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#2022) works fine with gcc, but it fails to compile if the object passes through a function. As pointed out by Jakub, i