[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #11 from Jonathan Wakely --- But note that the existing "mostly works" behaviour doesn't help solve the general problem, it would need entirely new code in the front end to be written from scratch for this specific call.

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #10 from Jonathan Wakely --- It _could_ be, see jakub's description in the dup of how it could be done

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-20 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #9 from Barry Revzin --- > I think it was never intentionally supported in constexpr (it just happened > to work) and so such code was never correct. Can it just be made to work in constexpr? Is there a reason not to? It already mo

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #8 from Jonathan Wakely --- (In reply to Barry Revzin from comment #3) > At this point lots of code relies on that working. I think it was never intentionally supported in constexpr (it just happened to work) and so such code was ne

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > Dup. > > *** This bug has been marked as a duplicate of bug 106889 *** I should say bug 106889 is exactly the same as this one and yes it is __builtin_strlen a

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #5 from Andrew Pinski --- Created attachment 61155 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61155&action=edit Reduced testcase without templates

[Bug c++/119866] constexpr with __builtin_strlen does not always work

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866 --- Comment #4 from Andrew Pinski --- And yes it is due to __builtin_strlen in some cases.