[Bug c++/115639] New: Large variations in compilation times involving static_assert

2024-06-25 Thread pkeir at outlook dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- I often want to be sure that an expression is evaluated at compile time, while also checking that it produces the expected value

[Bug c++/111272] [13/14 Regression] Truncated error messages with -std=c++23 and -std=c++26

2024-01-12 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111272 --- Comment #8 from Paul Keir --- I wonder if a small part of this bug still remains. The code below should #include , but as it doesn't, we get an error message. The message now gives all the right information but, with -std=c++23 and

[Bug c++/113306] New: constexpr cast from void* fails with typeid result target

2024-01-10 Thread pkeir at outlook dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- The C++26 code below fails to compile with GCC trunk; with Clang it passes. The error message indicates that the constexpr evaluator uses `const

[Bug libstdc++/113294] New: constexpr error from accessing inactive union member in basic_string after move assignment

2024-01-09 Thread pkeir at outlook dot com via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- The C++20 program below fails to compile. A call to `basic_string::clear()` in the move assignment

[Bug c++/111272] [13/14 Regression] Truncated error messages with -std=c++23 and -std=c++26

2023-09-12 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111272 --- Comment #4 from Paul Keir --- I believe P2448R2 would only allow the code, without the static_assert. Explicitly calling `test()`, `Jam::Jam()` and then `Jam::ft()` here would mean evaluating a non-constexpr function (i.e. `ft`). ft is

[Bug c++/111379] New: comparison between unequal pointers to void should be illegal during constant evaluation

2023-09-11 Thread pkeir at outlook dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- [DR 2526](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2526) clarifies that in C++23 comparison

[Bug c++/111272] [13/14 Regression] Truncated error messages with -std=c++23 and -std=c++26

2023-09-01 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111272 --- Comment #2 from Paul Keir --- Thanks. The `-Winvalid-constexpr` mentioned there is a helpful workaround.

[Bug c++/111272] New: Truncated error messages with -std=c++23 and -std=c++26

2023-09-01 Thread pkeir at outlook dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- The C++14 code below requires the `constexpr` specifier on the `ft` member function. Compiling this with `-std=c++14`, `-std=c++17` or `-std=c++20

[Bug c++/70248] constexpr initialization with unspecified equality expression accepted

2023-08-22 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70248 Paul Keir changed: What|Removed |Added CC||pkeir at outlook dot com --- Comment #10

[Bug c++/110714] constexpr lifetime error: base class this pointer

2023-07-18 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110714 --- Comment #3 from Paul Keir --- Actually, there's no need here to delete through the base pointer; so this is perhaps simpler: struct Base { constexpr Base* get_this() { return this; } int x; }; struct Derived : public Base {};

[Bug c++/110714] constexpr lifetime error: base class this pointer

2023-07-18 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110714 --- Comment #2 from Paul Keir --- I know. `delete pf` also works. The issue seems to be with the use of the this pointer within the member function. This is just the MRE - I've come across this issue twice now in our code base.

[Bug c++/110714] New: constexpr lifetime error: base class this pointer

2023-07-18 Thread pkeir at outlook dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Compiling the C++20 MRE code below fails: struct Base { constexpr virtual ~Base() {} constexpr Base* get_this() { return this; } int x; }; struct Derived : public

[Bug c++/106107] New: dynamic_cast fail within constant expression

2022-06-27 Thread pkeir at outlook dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 53210 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53210=edit The code described in the bug report. The dynamic_cast, evaluated wit

[Bug c++/102406] New: ICE on array declaration sized by a struct member

2021-09-19 Thread pkeir at outlook dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 51483 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51483=edit The code described in the bug report. Compiling the code below (also attac

[Bug c++/100138] New: ICE with constructor constrained (C++20 Concepts) by parameter pack length

2021-04-18 Thread pkeir at outlook dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 50624 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50624=edit The C++ file producing the

[Bug c++/96614] New: constexpr deletion failure through pointer to base with virtual base class

2020-08-14 Thread pkeir at outlook dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 49062 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49062=edit A C++ file containing the code descri

[Bug c++/95514] constexpr dynamic memory allocation compile error with inheritance and the this pointer

2020-08-14 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95514 Paul Keir changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/96510] New: Unexpected constexpr deallocation error after implicit conversion

2020-08-06 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 49012 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49012=edit A C++ file containing the code descri

[Bug c++/96414] Second char relation test incorrect with constexpr dynamic allocation

2020-08-01 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96414 --- Comment #1 from Paul Keir --- constexpr int lt_fun(const char& c1, const char& c2) { return c1 < c2; } constexpr bool doit() { char *pc = new char; const char* s = "a"; *pc = 'b'; lt_fun(*s, *pc); // a < b *pc = 'a';

[Bug c++/96414] New: Second char relation test incorrect with constexpr dynamic allocation

2020-08-01 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 48981 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48981=edit The file containing the code descri

[Bug c++/95977] No deallocation of temporary in return-statement during constant evaluation

2020-07-28 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95977 Paul Keir changed: What|Removed |Added CC||pkeir at outlook dot com --- Comment #2

[Bug c++/68342] Unexpected expansion pattern contains no argument packs error

2020-06-12 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68342 Paul Keir changed: What|Removed |Added Resolution|--- |WORKSFORME Status|UNCONFIRMED

[Bug c++/95514] constexpr dynamic memory allocation compile error with inheritance and the this pointer

2020-06-03 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95514 --- Comment #1 from Paul Keir --- The code above should also include: int main(int argc, char *argv[]) { static_assert(test1()); // test1(); // no problem return 0; }

[Bug c++/95514] New: constexpr dynamic memory allocation compile error with inheritance and the this pointer

2020-06-03 Thread pkeir at outlook dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 48671 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48671=edit The code descri

[Bug c++/93867] New: ICE using class type NTTPs and class template argument deduction

2020-02-21 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 47881 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47881=edit The code described in the bug report. The attac

[Bug c++/92530] New: Absent error on static_assert expression

2019-11-15 Thread pkeir at outlook dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 47272 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47272=edit The code described in the bug report. The static_assert expression in the C++11 code be

[Bug c++/88762] New: C++17 Deduction guide and operator expression produces missing template argument error

2019-01-08 Thread pkeir at outlook dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 45383 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45383=edit C++ file which produ

[Bug c++/83003] Using the detection idiom and void_t causes an error

2017-11-15 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83003 Paul Keir changed: What|Removed |Added CC||pkeir at outlook dot com --- Comment #1

[Bug c++/59498] [DR 1430][4.9/5/6/7 Regression] Pack expansion error in template alias

2016-07-04 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59498 --- Comment #13 from Paul Keir --- Yup, I just came up with exactly the same solution. Thanks.

[Bug c++/59498] [DR 1430][4.9/5/6/7 Regression] Pack expansion error in template alias

2016-07-02 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59498 Paul Keir changed: What|Removed |Added CC||pkeir at outlook dot com --- Comment #11

[Bug c++/71737] ICE following 2x pack expansion in non-pack with template alias

2016-07-02 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71737 --- Comment #1 from Paul Keir --- Created attachment 38820 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38820=edit Minimal testcase.

[Bug c++/71737] New: ICE following 2x pack expansion in non-pack with template alias

2016-07-02 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- The code below (and attached) produces an ICE with gcc (GCC) 7.0.0 20160608 (experimental) when compiled using g++ with "-c -std=

[Bug c++/68342] New: Unexpected expansion pattern contains no argument packs error

2015-11-13 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 36704 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36704=edit The code which produces the unexpected error The C+

[Bug c++/68278] New: internal compiler error with C++14 polymorphic lambda and type alias

2015-11-10 Thread pkeir at outlook dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Target Milestone: --- Created attachment 36682 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36682=edit C++14 file which produces the inter

[Bug c++/68278] internal compiler error with C++14 polymorphic lambda and type alias

2015-11-10 Thread pkeir at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68278 --- Comment #2 from Paul Keir --- Agreed. I've just tested on 6.0.0 20151110 and there is no ICE.

[Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error

2014-01-29 Thread pkeir at outlook dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pkeir at outlook dot com Created attachment 31987 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31987action=edit The test case which produces the internal

[Bug c++/59991] Recursive lambda capture in C++1y constexpr function template causes internal compiler error

2014-01-29 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59991 --- Comment #1 from Paul Keir pkeir at outlook dot com --- Created attachment 31988 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31988action=edit The output following: g++ -std=c++1y bug.cpp

[Bug c++/56387] Alias of class template wrongly seen as different

2013-02-19 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56387 --- Comment #2 from Paul Keir pkeir at outlook dot com 2013-02-19 12:01:51 UTC --- Created attachment 29492 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29492 Another unexpected error; and also an internal compiler error

[Bug c++/56387] Alias of class template wrongly seen as different

2013-02-19 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56387 --- Comment #3 from Paul Keir pkeir at outlook dot com 2013-02-19 12:18:17 UTC --- I've added gcc472aliastemplatebug.cpp which also displays an unexpected error; shown below along with the code. This is hopefully a related (and simpler) example

[Bug c++/56387] Alias of class template wrongly seen as different

2013-02-19 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56387 --- Comment #4 from Paul Keir pkeir at outlook dot com 2013-02-19 12:20:39 UTC --- Comment on attachment 29492 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29492 Another unexpected error; and also an internal compiler error

[Bug c++/56387] New: Alias of class template wrongly seen as different

2013-02-18 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56387 Bug #: 56387 Summary: Alias of class template wrongly seen as different Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal

[Bug c++/55013] New: variadic sizeof non-constant with alias template

2012-10-21 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55013 Bug #: 55013 Summary: variadic sizeof non-constant with alias template Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count

2012-09-30 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40205 --- Comment #3 from Paul Keir pkeir at outlook dot com 2012-09-30 21:29:22 UTC --- Still present in GFortran 4.7.2 on 32-bit Ubuntu 12.04.1.

[Bug c++/54763] New: Crash with enable_if (instead of recursive template errors)

2012-09-30 Thread pkeir at outlook dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54763 Bug #: 54763 Summary: Crash with enable_if (instead of recursive template errors) Classification: Unclassified Product: gcc Version: 4.7.2 Status: