[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #12 from CVS Commits --- The releases/gcc-12 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:825a47f1bb9a42df65157d4dc0a11b2c054e97cc commit r12-9176-g825a47f1bb9a42df65157d4dc0a11b2c054e97cc Author: Marek Polacek

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:d482b20fd346482635a770281a164a09d608b058 commit r13-6060-gd482b20fd346482635a770281a164a09d608b058 Author: Marek Polacek Date: T

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #10 from Marek Polacek --- (In reply to Andrew Pinski from comment #8) > (In reply to Marek Polacek from comment #7) > > I know you can't jump into a statement expression but that's not what's > > happening here. The kernel uses thi

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #9

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #8 from Andrew Pinski --- (In reply to Marek Polacek from comment #7) > I know you can't jump into a statement expression but that's not what's > happening here. The kernel uses this trick to get the current address for > error mess

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #7 from Marek Polacek --- I know you can't jump into a statement expression but that's not what's happening here. The kernel uses this trick to get the current address for error messages: #define __this_address ({ __label__ __here;

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #6 from Andrew Pinski --- On the statement expression part, it is documented that jumping into statement expression is not allowed too: https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Statement-Exprs.html#Statement-Exprs >Jumping into

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #5 from Andrew Pinski --- (In reply to Marek Polacek from comment #3) > I don't think we should be warning here at all and I have a patch to that > effect. I also disagree with the saying we should not be warning here. Address to la

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 --- Comment #4 from Andrew Pinski --- (In reply to Marek Polacek from comment #3) > This came up in kernel: https://bugzilla.kernel.org/show_bug.cgi?id=215851 > which I've reduced to > > void > foo (void **failaddr) > { > *failaddr = ({ __la

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2023-02-14 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug middle-end/106080] Labels as values triggering -Wdangling-pointer

2022-06-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106080 Andrew Pinski changed: What|Removed |Added See Also||https://github.com/ocaml/oc