++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
Doesn't occur with g++-9 but does happen with Ubuntu 20.04 GCC-10 and at head
w. SHA a33649e6
Ubuntu 20.04 GCC-10:
john@carbon:~/ws/gcc/build$ g++ --version
g++ (Ubuntu 10-202
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94955
--- Comment #5 from John McFarlane ---
I have applied a workaround and am not blocked:
https://github.com/johnmcfarlane/cnl/pull/589/commits/ca3478ed0002e5834227d7b6fa0010910aabc875
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125
--- Comment #2 from John McFarlane ---
Here are two more:
constexpr int dubious_increment(int i) { return ++i + ++i; }
static_assert(dubious_increment(0) == 3);
constexpr int dubious_increment(int i) { return i; }
static_ass
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125
--- Comment #7 from John McFarlane ---
Confirmed. Thank you!
On Mon, 19 Aug 2019 at 15:02, mpolacek at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85125
>
> Marek Polacek changed:
>
>
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
Tested in godbolt.org ([example](https://godbolt.org/g/dhtXmH)) with x86-64
versions from 5.1 to 7.3 and trunk. Options are `-Wall -Wextra` but
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
The following code compiles:
template struct S {};
template constexpr T v;
constexpr auto c = v>;
The result is a variable of type `struc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047
--- Comment #3 from John McFarlane ---
This still happens when S has member variables. For example, if `S` is
replaced with `std::complex`, then `v>` is `{0,0}`.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
The following fragment fails to compile because the second `static_assert`
fires incorrectly. Removing the first `static_assert` causes the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82226
--- Comment #2 from John McFarlane ---
79092?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
John McFarlane changed:
What|Removed |Added
CC||john at mcfarlane dot name
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
--- Comment #8 from John McFarlane ---
And this input can generate an ICE even with the -std=c++2a switch:
template class a;
template a()->a;
template <2> using c a;
static_assert(c{ }
CL: g++ -v -std=c++2a source.cpp
Online
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
--- Comment #9 from John McFarlane ---
And here is an ICE in 10.2:
struct a;
template class b;
template b()->b<>;
template using c = b;
static_assert(c{}
CL: g++ -v -std=c++2a source.cpp
Online: https://godbolt.org/z/54aTr6
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
As of 9a27acc30a34b7854db32eac562306cebac6fa1e, "Make full use of
context-sensitive ranges in access warnings.", this source.cpp
#include
template vo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483
--- Comment #5 from John McFarlane ---
Here is an example of the real-world code causing this warning:
https://github.com/johnmcfarlane/cnl/blob/6d46b6cf10a998e3bdcc32557f202c8579b5717c/test/unit/scaled_int/to_chars.h#L60
It is converting a num
++
Assignee: unassigned at gcc dot gnu.org
Reporter: john at mcfarlane dot name
Target Milestone: ---
With flag, `-ftrapv`, the following program on CE with 'x86-64 gcc 11.2' has
exit status 139:
int main()
{
int n = 0x7fff;
return n+1;
15 matches
Mail list logo