[Bug c++/103443] New: consteval function rejected as constant expression

2021-11-26 Thread vincent.hamp at higaski dot at via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- Not really sure whether that's a frontend or a libstdc++ bug, but GCC 11.1.0 (and according to godbolt trunk as well) does not accept the following sn

[Bug c++/99059] New: Static inline variable can't refer to itself

2021-02-10 Thread vincent.hamp at higaski dot at via Gcc-bugs
nt: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- Declaring a static inline member variable and initializing it with a pointer to itself is currently impossible. The textbook example for such code would probably be a l

[Bug c++/95307] New: Compiler accepts reinterpret_cast in constexpr

2020-05-24 Thread vincent.hamp at higaski dot at
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- The following snippet allows using reinterpret_casts inside a constexpr. #include uint64_t v; constexpr auto p{reinterpret_cast(&v) - 1u}; Compiled with GCC 10.1

[Bug c++/94422] New: static_cast from std::array to enum class

2020-03-31 Thread vincent.hamp at higaski dot at
++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- static_cast from std::array operator[] to an enum class inside a template class produces an unexpected expression error. It seems that error is only present in 9.3, 9.2 and

[Bug c++/92134] New: static constinit members incorrectly compile

2019-10-17 Thread vincent.hamp at higaski dot at
++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- The new C++20 constinit specifier currently doesn't seem to work with static data members. The following snippet compiles although the constructor of Value call

[Bug c++/92003] New: constexpr-ness of char const* doesn't propagate

2019-10-05 Thread vincent.hamp at higaski dot at
onent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- For some reasons the compiler seems to differ between a constexpr char const* which is directly initialized by a string literal and one which actually points

[Bug c++/89871] New: Wall + designated initializers

2019-03-28 Thread vincent.hamp at higaski dot at
++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.hamp at higaski dot at Target Milestone: --- Created attachment 46050 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46050&action=edit Example fails to compile with -Wall Using a struct with an anonymous union and tr