[Bug c++/67795] Wrong code generated for conditional expression with cast

2022-02-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Martin Liška changed: What|Removed |Added Status|NEW |WAITING

[Bug c++/67795] Wrong code generated for conditional expression with cast

2021-12-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment

[Bug c++/67795] Wrong code generated for conditional expression with cast

2021-10-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/67795] Wrong code generated for conditional expression with cast

2017-07-27 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Andrew Pinski changed: What|Removed |Added Target Milestone|5.5 |---

[Bug c++/67795] Wrong code generated for conditional expression with cast

2016-06-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Richard Biener changed: What|Removed |Added Target Milestone|5.4 |5.5 --- Comment #13 from Richard

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-12-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Richard Biener changed: What|Removed |Added Target Milestone|5.3 |5.4 --- Comment #12 from Richard

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Markus Trippelsdorf changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 --- Comment #3 from frankhb1989 at gmail dot com --- (In reply to Markus Trippelsdorf from comment #1) > gcc even warns: > > t.cpp: In function ‘std::experimental::fundamentals_v1::string_view& > erase_left(size_t,

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 frankhb1989 at gmail dot com changed: What|Removed |Added Version|unknown |5.2.0 --- Comment #6 from

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Marc Glisse changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Version|5.2.0

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 --- Comment #8 from frankhb1989 at gmail dot com --- (In reply to Markus Trippelsdorf from comment #4) > Return by value if you want to avoid undefined behavior. No. This is not the point. For something like 'std::move' or 'std::forward', can

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 --- Comment #9 from frankhb1989 at gmail dot com --- (In reply to Richard Biener from comment #5) > I would guess the issue is that ?: returns an rvalue (but that may not be > 100% correct if omitting the cast works and does not warn) In C++ ?:

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Markus Trippelsdorf changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 frankhb1989 at gmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 --- Comment #5 from Richard Biener --- I would guess the issue is that ?: returns an rvalue (but that may not be 100% correct if omitting the cast works and does not warn)

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread frankhb1989 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 --- Comment #10 from frankhb1989 at gmail dot com --- (In reply to Marc Glisse from comment #7) > Hmm, with the static_cast, the front-end produces: > > < = (struct string_view &) (struct string_view > *) NON_LVALUE_EXPR <(struct string_view &)

[Bug c++/67795] Wrong code generated for conditional expression with cast

2015-10-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795 Marc Glisse changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRMED