[Bug c++/111440] wrong-code for ternary with reference-compatible arguments due to C++ defect report 2352

2023-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111440 --- Comment #4 from Andrew Pinski --- (In reply to Lénárd Szolnoki from comment #3) > Note that GCC seems to implement CWG2352 outside of ternary operators. Yes that was done in GCC 10 (see PR 91844).

[Bug c++/111440] wrong-code for ternary with reference-compatible arguments due to C++ defect report 2352

2023-09-17 Thread leni536 at gmail dot com via Gcc-bugs
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;

[Bug c++/111440] wrong-code for ternary with reference-compatible arguments

2023-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111440 --- Comment #2 from Andrew Pinski --- clang change: https://github.com/llvm/llvm-project/commit/f041e9ad706aee7987c5299427c33424fcabbd0d

[Bug c++/111440] wrong-code for ternary with reference-compatible arguments

2023-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111440 --- Comment #1 from Andrew Pinski --- Note clang changed between version 9 and 10 for the defect report it seems ...