Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
I think the most clearcut example is:
int main() {
using T = int[];
T{1, 2} == nullptr;
}
This compiles fine with clang, and is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
Bug #: 55120
Summary: Inaccessible virtual base constructor does not prevent
generation of default constructor
Classification: Unclassified
Product: gcc
Version: 4.7.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
--- Comment #1 from Nick Krempel 2012-10-29
16:08:49 UTC ---
Not so clear this is a bug, as the default constructor for D could be generated
in the following form:
struct D : B {
D() : B(), ::V() {}
}
Note the reference to V via t
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120
--- Comment #4 from Nick Krempel 2012-10-29
22:41:48 UTC ---
I think the standard is unclear on this. That defect report has been queried by
experts.
It comes down to something subtle about how the generated default constructor
attempts
++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
The following program fails to compile (with -std= any of c++11, c++14, c++17,
c++2a):
int main() {
reinterpret_cast(static_cast(0));
}
The error reported is:
gcc
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
The following code deduces T = Foo using gcc 9.1, whereas gcc 8.3 (and clang 7
up) deduced T = const Foo. My reading of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90546
--- Comment #1 from Nick Krempel ---
My interpretation of the standard didn't take into account the reference to
http://eel.is/c++draft/over.match.ref when determining the type A.
It says that A will be "lvalue reference to cv2 T2 ... where cv1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90546
--- Comment #2 from Nick Krempel ---
However it's also worth noting that if you take the original snippet and change
the declaration of "test" to accept a const rvalue reference instead: "void
test(const Foo&&);", then gcc 9.1 (and all other gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61663
Nick Krempel changed:
What|Removed |Added
CC||ndkrempel at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90546
--- Comment #4 from Nick Krempel ---
Here's one way to turn it into a test case which fails to compile:
struct Foo {};
void test(const Foo&) {}
Foo f;
struct Bar {
template operator T&&() = delete;
};
template<> Bar::operator const Foo&&() {
++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
Inserting into a vector with an rvalue reference to an item already in the
vector produces incorrect results (specifically when inserting prior to the
existing location and when a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90934
--- Comment #1 from Nick Krempel ---
(The same buggy behavior is seen with "emplace" instead of "insert".)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90934
--- Comment #2 from Nick Krempel ---
I believe the same issue afflicts libc++, but not MSVC's implementation.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90934
--- Comment #4 from Nick Krempel ---
Thanks, accepted.
NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
Created attachment 38209
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38209&action=
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ndkrempel at gmail dot com
Target Milestone: ---
The following code produces a segfault in gcc versions 8.1 up to 10.2 and trunk
(using -std=c++2a or -std=c++20):
int main() {
[]()noexcept(noexcept(({constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
--- Comment #1 from Nick Krempel ---
The following slightly simpler code also repros the issue:
int main() {
[]()noexcept(({constexpr int&&x=1;}));
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98150
--- Comment #2 from Nick Krempel ---
Realised it doesn't need C++20 and was able to repro back in gcc 6.1 too.
18 matches
Mail list logo