[Bug c++/93083] copy deduction rejected when doing CTAD for NTTP

2020-05-20 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93083 --- Comment #2 from Hana Dusíková --- Same error is also triggered by template partial specialization: ``` template struct literal { constexpr literal(const char (&input)[N]) noexcept { } constexpr literal(const literal &) noexc

[Bug c++/88537] New: class nontype template parameter debug mode crash in dwarf2out.c

2018-12-18 Thread hanicka at hanicka dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Created attachment 45253 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45253&action=edit minimal example which will cra

[Bug c++/88538] New: parse error with class nontype template parameter

2018-12-18 Thread hanicka at hanicka dot net
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Created attachment 45254 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45254&action=edit parser error on line 12 Compiler should be able to parse attached co

[Bug c++/88820] New: ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2019-01-13 Thread hanicka at hanicka dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Created attachment 45420 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45420&action=edit one file with all includes i

[Bug c++/88820] ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820 --- Comment #1 from Hana Dusíková --- I think I found a related problem. It's about deducting argument of a class when instantiating subtype. I created a minimal case. I'm attaching.

[Bug c++/88092] class nontype template deduction failed when providing type to class

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88092 --- Comment #6 from Hana Dusíková --- Created attachment 45421 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45421&action=edit argument deduction of parent type

[Bug c++/88092] class nontype template deduction failed when providing type to class

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88092 --- Comment #7 from Hana Dusíková --- If you compile it with: g++-HEAD minimal.cpp -std=c++2a -DREFERENCE => correct g++-HEAD minimal.cpp -std=c++2a -DAUTO => correct g++-HEAD minimal.cpp -std=c++2a -DCNTTP minimal.cpp: In member functio

[Bug c++/88820] ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820 --- Comment #2 from Hana Dusíková --- Created attachment 45422 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45422&action=edit referencing subtype unable to deduce parent type ~/projekty/ice-gcc > g++-HEAD minimal.cpp -std=c++2a -DREFERE

[Bug c++/88092] class nontype template deduction failed when providing type to class

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88092 --- Comment #8 from Hana Dusíková --- Please ignore two last comments, I sent them to wrong bug, it was supposed to be for #88820.

[Bug c++/88820] ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2019-01-13 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820 --- Comment #4 from Hana Dusíková --- The ICE will not happen if you comment out line 464 from first example.

[Bug c++/81429] maybe_unused attribute triggers syntax error when used on first argument to a constructor

2019-08-06 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81429 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/88820] [7/8/9 Regression] ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2019-03-06 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820 --- Comment #9 from Hana Dusíková --- You can have template deduction placeholder there in C++20. https://wg21.link/p0732r2

[Bug c++/88092] New: class nontype template deduction failed when providing type to class

2018-11-19 Thread hanicka at hanicka dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Created attachment 45034 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45034&action=edit minimal example (workaround

[Bug c++/88095] New: class nontype template parameter UDL string literals doesn't accepts deduction placeholder

2018-11-19 Thread hanicka at hanicka dot net
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Created attachment 45035 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45035&action=edit smal

[Bug c++/88092] class nontype template deduction failed when providing type to class

2018-12-05 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88092 --- Comment #4 from Hana Dusíková --- (In reply to Emmanuel Le Trong from comment #3) > I have a problem with this. AFAIK, nowhere in the standard is written that a > class template without argument (i.e. not a type!) can be used as the type > of

[Bug c++/88092] class nontype template deduction failed when providing type to class

2018-12-05 Thread hanicka at hanicka dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88092 --- Comment #5 from Hana Dusíková --- So minimal example is: template struct S { constexpr S(...) { } }; template S(T) -> S; template struct foo { }; template void fn () { auto t = s; foo f1; foo f2; }

[Bug c++/99637] New: bit_cast doesn't work with padding bits and it should

2021-03-17 Thread hanicka at hanicka dot net via Gcc-bugs
y: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Standard states in https://eel.is/c++draft/bit.cast#2 "Padding bits of the result are unspecified." Current trunk GCC (11.0.1 20210316) gives error

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2021-03-17 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 --- Comment #2 from Hana Dusíková --- I know this is not an argument but MSVC accepts this code, meanwhile I'm asking Richard what to do about it.

[Bug c++/96742] [10/11 Regression] "warning: comparison of unsigned expression in ‘< 0’ is always false" with dependent values

2020-10-23 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96742 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/98805] New: exception abort on mac os 11 (big sur)

2021-01-23 Thread hanicka at hanicka dot net via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Any C++ code I try to compile with GCC 10.2.0 (homebrew package AND build from source) aborts when exception is thrown even when the exception should caught. This minimal example

[Bug c++/98805] exception abort on mac os 11 (big sur)

2021-01-24 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98805 --- Comment #1 from Hana Dusíková --- I found out that build done on Catalina generates correct binary, which is able to run on Big Sur without any problem.

[Bug c++/99013] New: std::source_location::function_name should return same result in constexpr mode and non-constexpr

2021-02-08 Thread hanicka at hanicka dot net via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Hi found out std::source_location is returning different result in constexpr: ``` #include template

[Bug libstdc++/108517] New: std::sort of empty range yield "warning: 'this' pointer is null"

2023-01-24 Thread hanicka at hanicka dot net via Gcc-bugs
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Bug in GCC 11.1-13 (including trunk) https://compiler-explorer.com/z/EEjeaKfv7 I couldn't mini

[Bug c++/102045] New: constructor is not being instantiated

2021-08-24 Thread hanicka at hanicka dot net via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- this error is in 11.0+ (including current trunk) and wasn't in gcc-10, the compiler won't emit std::span::span symbol as it should ``` #include struct byte_writer:

[Bug c++/110367] [C++26] Add new built-in for std::is_within_lifetime

2024-08-17 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110367 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/112633] New: ICE in parser GCC 13+ (including 14) around type aliases

2023-11-19 Thread hanicka at hanicka dot net via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Tested on GCC 14.0.0 20231119 (on Compiler-Explorer) and it's giving me ICE, also on all 13.x versions (not 12.x) ```c++ template cons

[Bug c++/112633] [13/14 Regression] ICE with type aliases and depedent value

2023-11-22 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112633 --- Comment #5 from Hana Dusíková --- Thanks for really quick fix! You are awesome!

[Bug c++/110380] [feature request] "-pg-constexpr=coverage-output" emit coverage metrics for constexpr code evaluated at compile time

2023-06-26 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110380 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/117392] template argument deduction problem with CNTTP

2024-11-01 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117392 --- Comment #3 from Hana Dusíková --- Thanks for the workaround!

[Bug c++/117392] New: template argument deduction problem with CNTTP

2024-11-01 Thread hanicka at hanicka dot net via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Link to code and comparison with clang: https://compiler-explorer.com/z/zaqjYzfs4 In this a bit convoluted code I found while working on `P2781R4 std::constant_wrapper

[Bug c++/117392] template argument deduction problem with CNTTP

2024-11-01 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117392 --- Comment #1 from Hana Dusíková --- Also it seems same error is there since GCC 11. In GCC 10 it segfaults.

[Bug c++/118237] New: failure to compile constexpr variable initialization with properly destroyed allocation inside the expression

2024-12-29 Thread hanicka at hanicka dot net via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- Hi, I was looking into dynamic allocation tracking, and found simple

[Bug c++/118237] failure to compile constexpr variable initialization with properly destroyed allocation inside the expression

2024-12-29 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118237 --- Comment #1 from Hana Dusíková --- Error I'm getting is: ``` :1:43: error: the value of '' is not usable in a constant expression 1 | constexpr auto f = (delete new int{42}, 32); | ^ :1:38:

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-02-17 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 Hana Dusíková changed: What|Removed |Added CC||hanicka at hanicka dot net --- Comment

[Bug c++/118903] constexpr variables with co_await expression in its initialization expression

2025-02-17 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118903 --- Comment #2 from Hana Dusíková --- https://compiler-explorer.com/z/58reoonEW (trunk GCC 2ef2b206c4617abae60002280455f7175aaa6064) ```c++ #include struct awaitable { constexpr bool await_ready() { return true; } void aw

[Bug c++/118903] New: constexpr variables with co_await expression in its initialization expression

2025-02-17 Thread hanicka at hanicka dot net via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hanicka at hanicka dot net Target Milestone: --- According https://eel.is/c++draft/expr.const#10.23 "an await-expression ([expr.await]);" await expression are n

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-05-27 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #12 from Hana Dusíková --- I'm using [[gnu::used]] to emit constexpr symbol so it can be part of compatible interface.

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-05-28 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #17 from Hana Dusíková --- (In reply to Jakub Jelinek from comment #16) > So, the paper added also the new case to > https://eel.is/c++draft/expr.const#10.27 > but > https://eel.is/c++draft/expr.new#8.5 > has not been changed and sti

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-05-28 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #18 from Hana Dusíková --- (In reply to Jakub Jelinek from comment #16) > So, the paper added also the new case to > https://eel.is/c++draft/expr.const#10.27 > but > https://eel.is/c++draft/expr.new#8.5 > has not been changed and sti

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #37 from Hana Dusíková --- Btw I have noticed you touched the library, btu the feature test macro is defined only in , not in and also the value is 202502L, which is only when , , , exceptions will be constexpr (as specified P3378)

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #26 from Hana Dusíková --- (In reply to Jakub Jelinek from comment #25) > In the end this is done only for classes derived from std::exception, to > match e.g. the verbose terminate handler at runtime. I wonder why? Is there technic

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #33 from Hana Dusíková --- (In reply to Jonathan Wakely from comment #32) > ... at compile-time does it matter if the what() function does something > else? It can't launch missiles or format hard drives during consteval. The > worst

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #28 from Hana Dusíková --- (In reply to Jakub Jelinek from comment #27) > (In reply to Hana Dusíková from comment #26) > > (In reply to Jakub Jelinek from comment #25) > > > In the end this is done only for classes derived from std::

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #30 from Hana Dusíková --- Core told me to take the note out because there is no exception in moment I'm printing error, because it's not valid constant evaluation therefore invalid program. Which seems legal technicality. Btw did yo

[Bug c++/117785] [C++26] P3068R5 - constexpr exceptions

2025-07-11 Thread hanicka at hanicka dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785 --- Comment #35 from Hana Dusíková --- Btw another thing ... Jakub, how do you feel about disabling `-fno-exception` in consteval code or even constexpr code which doesn't result in codegen?