https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114877
--- Comment #3 from Lénárd Szolnoki ---
(In reply to Richard Biener from comment #2)
> The standard says the results are unspecified, it doesn't say *p is written
> to,
> so I'm not sure there's a bug here.
C17 (N2176) says in the library secti
t: c
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
arch: x86_64
command line arguments: -std=c17 -O2 -pedantic-errors
#include
#include
int frexp_test(bool b) {
if (b) {
int x;
(void)frexp(NAN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106371
Lénárd Szolnoki changed:
What|Removed |Added
CC||leni536 at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111776
--- Comment #3 from Lénárd Szolnoki ---
The C++ standard currently doesn't specify what the behavior of these program
snippets are. This is CWG2805.
https://cplusplus.github.io/CWG/issues/2805.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111776
--- Comment #2 from Lénárd Szolnoki ---
Same ICE without destroying delete:
```
struct A {
void operator delete(void *);
};
struct B {
void operator delete(void *);
};
struct C : A, B {
using A::operator delete;
using B::opera
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: gcc 13.2.0
flags: -std=c++20 -O2 -pedantic-errors
```
#include
struct B {
void operator delete(B* ptr, std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111440
--- Comment #3 from Lénárd Szolnoki ---
Note that GCC seems to implement CWG2352 outside of ternary operators.
https://godbolt.org/z/rnMcPqE7b
```
template
void foo();
bool bar() {
int * ptr = nullptr;
const int * const &ref = ptr;
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ 13.2.0
flags: -std=c++20 -O2 -pedantic-errors
Consider the following code:
```
template
void foo();,
bool bar() {
int
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
With g++ 13.2.0
with flags: -std=c++20
The following code:
```
struct A {
A() noexcept {}
};
void foo() {
using T = const A (&)[1];
T{};
}
```
Produces
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102989
Lénárd Szolnoki changed:
What|Removed |Added
CC||leni536 at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103343
--- Comment #4 from Lénárd Szolnoki ---
A complete program example:
f.h:
```
#pragma once
extern int x[1];
extern int y;
int f(int* p, int* q);
```
f.cpp:
```
#include "f.h"
int f(int* p, int* q) {
*q = y;
if (p == (x + 1)) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10
--- Comment #1 from Lénárd Szolnoki ---
This can be turned into wrong-code.
C++11 example without includes:
```
template
struct enable_if {};
template
struct enable_if {
using type = T;
};
template
using enable_if_t = typename enable_
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
Version:
g++
(Compiler-Explorer-Build-gcc-48e8a7a677b8356df946cd12fbb215538828e747-binutils
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
Version: g++ (Compiler-Explorer-Build) 12.0.0 20210420 (experimental)
Flags: -std=c++20 -O2 -pedantic-errors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98419
--- Comment #2 from Lénárd Szolnoki ---
This is probably invalid, I wasn't aware of
http://eel.is/c++draft/class.temporary#3
> When an object of class type X is passed to or returned from a function, if X
> has at least one eligible copy or mov
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
Version:
g++ (Compiler-Explorer-Build) 10.2.0
Command line options:
-std=c++17 -O2 -pedantic-errors
```
struct A {
int i
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ (Compiler-Explorer-Build) 10.2.0
arguments: -O2 -std=c++17 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163
--- Comment #4 from Lénárd Szolnoki ---
Other example in the same spirit, but not using array of unknown bound:
```
template
struct S {};
template
void foo(T) {}
int i;
constexpr const int& iref = i;
template void foo(S);
template void foo(
RMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
g++ (Compiler-Explorer-Build) 11.0.0 20201205 (experimental)
command line flags: -std=c++17 -pedantic-er
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97645
--- Comment #2 from Lénárd Szolnoki ---
(In reply to Lénárd Szolnoki from comment #0)
> This was possibly impossible prior to C++20 to subscript an array of unknown
> bound in constexpr context. As of P0388 conversion from T[N] to T[] can
> happe
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental)
options: -std=c++17 -O2 -pedantic-errors
g++ rejects the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86373
Lénárd Szolnoki changed:
What|Removed |Added
CC||leni536 at gmail dot com
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental)
options: -std=c++20 -O2 -pedantic-errors
g++ accepts the following program
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental)
g++ rejects the following program in -std=c++20
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental)
https://godbolt.org/z/a8sKr3
In C++20 the following
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93711
Lénárd Szolnoki changed:
What|Removed |Added
CC||leni536 at gmail dot com
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
gcc accepts the following code:
enum E {
one = 1
};
constexpr E foo() {
return static_cast(0x);
}
void bar() {
constexpr auto e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95686
--- Comment #2 from Lénárd Szolnoki ---
I failed to mention that I compiled the example in -std=c++17. With this
compiler option it compiles but fails to link in gcc. It compiles, links and
runs as expected in clang.
The linkage requirement for
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
The following code produces an "undefined reference to `foo()::i'" linker
error:
template
struct S {
static cons
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86577
--- Comment #3 from Lénárd Szolnoki ---
(In reply to Jonathan Wakely from comment #2)
> Is this a dup of PR 51577 ?
Yes, seems like it is.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86577
Lénárd Szolnoki changed:
What|Removed |Added
CC||leni536 at gmail dot com
--- Comment
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
The compiler bumps into an internal compiler error on the following, valid
code:
//aggregate base class
struct A1 {
A1() = default;
A1(const A1&) = de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77875
--- Comment #3 from Lénárd Szolnoki ---
A more worrisome example presumably for this same bug, it's a miscompilation:
template
decltype(auto) as_const(T& t) {
using const_ref = const T&;
return const_ref{t};
}
int main() {
int i =
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
gcc doesn't compile the following well-formed program:
void foo () {
using T = int&;
int i{};
T{i};
}
$ g++ -std=c++17 -c
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
The following code triggers an ICE in g++ 9.0.1:
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: leni536 at gmail dot com
Target Milestone: ---
g++ accepts this ill-formed code:
constexpr const int& foo(int x, int y) {
const int& z = x+y;
return z;
}
const
36 matches
Mail list logo