[Bug c++/110828] union constexpr dtor not constexpr when used in member array

2023-07-27 Thread gccbugbjorn at fahller dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110828 --- Comment #2 from Björn Fahller --- If I write it in the same way in a function, it compiles. consteval auto f() { return S{}.f(); } constexpr auto b = f(); However, if I break it into a constexpr object S s; and return s.f(), it does

[Bug c++/110828] New: union constexpr dtor not constexpr when used in member array

2023-07-27 Thread gccbugbjorn at fahller dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- The following code does not compile with g++ 13.1 or g++ trunk 82c2a34b2f2c1a06eff672eba2e447b53f35d7b0 union type { constexpr

[Bug c++/104944] New: incorrect alignas(void) accepted (with warning if templated)

2022-03-15 Thread gccbugbjorn at fahller dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- The erroneous code: struct alignas(void) S{}; Is accepted without any diagnostic with g++ (Compiler-Explorer-Build-gcc

[Bug c++/100047] False -Wmaybe-uninitialized on one var depending on type of other var

2021-04-12 Thread gccbugbjorn at fahller dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100047 --- Comment #1 from Björn Fahller --- Created attachment 50570 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50570&action=edit Test program exposing the bug bf@pteranodon /tmp> g++-10 -c -std=c++17 -Wmaybe-uninitialized ./t.cpp -Og # no

[Bug c++/100047] New: False -Wmaybe-uninitialized on one var depending on type of other var

2021-04-12 Thread gccbugbjorn at fahller dot se via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- With the following C++17 code, there's a warning that m_size can be used uninitialized if m_ptr is a std::unique_ptr<&g

[Bug c++/97837] ICE on requires with *this in destructor

2020-11-15 Thread gccbugbjorn at fahller dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97837 --- Comment #2 from Björn Fahller --- Should maybe mention that the code is terribly wrong in so many ways, but the compiler should still not crash because of it.

[Bug c++/97837] ICE on requires with *this in destructor

2020-11-15 Thread gccbugbjorn at fahller dot se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97837 --- Comment #1 from Björn Fahller --- Created attachment 49561 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49561&action=edit Source of failing program

[Bug c++/97837] New: ICE on requires with *this in destructor

2020-11-15 Thread gccbugbjorn at fahller dot se via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 49560 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49560&action=edit Preprocessed source of failing program The following code causes an ICE

[Bug c++/96819] ICE when reading from libc++ 9

2020-08-27 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96819 --- Comment #1 from Björn Fahller --- Compilation error message is: In file included from :1: /opt/compiler-explorer/clang-9.0.0/include/c++/v1/tuple: In substitution of 'template template template using _PreferTupleLikeConstructor = std::__1::

[Bug c++/96819] New: ICE when reading from libc++ 9

2020-08-27 Thread gccbugbjorn at fahller dot se
++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 49140 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49140&action=edit Preprocessed source of #include from libc++9 This program causes an ICE when compil

[Bug c++/96630] New: dangling reference accepted in constexpr evaluation

2020-08-16 Thread gccbugbjorn at fahller dot se
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 49065 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49065&action=edit Example code This program uses a reference to an out-of-scop

[Bug c++/96400] New: False positive on Wunused-but-set-variable for static constexpr var used in lambda

2020-07-31 Thread gccbugbjorn at fahller dot se
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Similar to Bug 96311, but not quite the same. This code is flags "is_zero" as being unused but set:

[Bug c++/93043] New: fails to compile comparison between pointer and convertible to nullptr_t

2019-12-22 Thread gccbugbjorn at fahller dot se
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 47541 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47541&action=edit Failing example progr

[Bug c++/92198] New: error "different exception specifier" with forward referring noexcept condition

2019-10-23 Thread gccbugbjorn at fahller dot se
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 47095 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47095&action=edit Fai

[Bug c++/91701] New: ICE in condiional noexcept on lambda

2019-09-08 Thread gccbugbjorn at fahller dot se
++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- This bug looks very similar to bug 79590, but that is supposedly fixed in 7.1 and later. This one still fails in 7.1 through 7.4, but works in 8 and 9. The following code snippet

[Bug c++/91697] New: Cannot use this in noexcept specifier

2019-09-07 Thread gccbugbjorn at fahller dot se
++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- This C++11 code compiles with g++ 9.1, but fails with g++ versions 8, 7, 6, 5, 4.9, 4.8, and 4.7. template void f(const T&) noexcept; struct S { auto fr() const -> dec

[Bug c++/89565] New: [C++2a] ICE on template instantiating user defined non-type template from template value member

2019-03-03 Thread gccbugbjorn at fahller dot se
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- This code: template struct N{}; template struct S {}; template using NS = S; ICE's gcc-trun

[Bug c++/85569] is_invocable(F, decltype(objs)...) fails with "not supported by dump_expr#" unless via indirection

2018-04-29 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85569 --- Comment #2 from Björn Fahller --- Created attachment 44039 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44039&action=edit Preprocessed version of tests.cpp

[Bug c++/85569] is_invocable(F, decltype(objs)...) fails with "not supported by dump_expr#" unless via indirection

2018-04-29 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85569 --- Comment #1 from Björn Fahller --- Created attachment 44038 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44038&action=edit Test program exposing the bug

[Bug c++/85569] New: is_invocable(F, decltype(objs)...) fails with "not supported by dump_expr#" unless via indirection

2018-04-29 Thread gccbugbjorn at fahller dot se
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- The following program compiles as C++17 with g++-7.3, but not with g++-8 built from /br

[Bug c++/85568] New: is_invocable(F, decltype(objs)...) fails with "not supported by dump_expr#" unless via indirection

2018-04-29 Thread gccbugbjorn at fahller dot se
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 44037 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=4403

[Bug c++/83644] ICE using type alias from recursive decltype in noexcept or return type

2018-01-01 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83644 --- Comment #1 from Björn Fahller --- Created attachment 42997 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42997&action=edit Preprocessed source

[Bug c++/83644] New: ICE using type alias from recursive decltype in noexcept or return type

2018-01-01 Thread gccbugbjorn at fahller dot se
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 42996 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42996&action=edit Source of failing progr

[Bug c++/79070] Unhelpful error message for ambiguous type in template parameter

2017-01-12 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79070 --- Comment #1 from Björn Fahller --- More info: adding an alias for a function signature involving the ambiguous Foo in the above program gives a directly misleading error message: using type = void(Foo); c.cpp:12:18: error: expected ';' befor

[Bug c++/79070] New: Unhelpful error message for ambiguous type in template parameter

2017-01-12 Thread gccbugbjorn at fahller dot se
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Compiling the below program with g++-7 on gcc.godbolt.org and other self builts, and also older releases of g++: namespace A

[Bug libstdc++/78939] [C++17] interferes with structured binding from struct

2016-12-28 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78939 --- Comment #4 from Björn Fahller --- It also only partially solves the problem. If the struct is made const, or the decomposition declaration is changed to "auto const& [p] = s;", it still fails.

[Bug c++/78931] [7 Regression] ICE on C++17 structured bindings from struct with reference member

2016-12-28 Thread gccbugbjorn at fahller dot se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78931 --- Comment #4 from Björn Fahller --- I can confirm that this works with my original program too, and not just the condensed test case.

[Bug c++/78939] New: interferes with structured binding from struct

2016-12-28 Thread gccbugbjorn at fahller dot se
++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 40423 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40423&action=edit preprocessed source Using a home build from rvn rev 243954, I

[Bug c++/78931] New: ICE on C++17 structured bindings from struct with reference member

2016-12-27 Thread gccbugbjorn at fahller dot se
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gccbugbjorn at fahller dot se Target Milestone: --- Created attachment 40413 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40413&action=edit preprocessed t.cpp GCC 7 s