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
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
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
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
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
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.
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
++
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
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::
++
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
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
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:
: 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
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
++
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
++
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
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
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
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
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
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
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
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
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
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
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.
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.
++
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
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
29 matches
Mail list logo