https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #10 from Jonathan Wakely ---
(In reply to Szüllő Ádám from comment #8)
> Yes, the code as a whole is invalid.
> But for(int i=0; i<4; i++) is well defined.
No, that's not how undefined behaviour works. It isn't bounded or localised
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #9 from Jonathan Wakely ---
(In reply to Szüllő Ádám from comment #4)
> i understand that missing return value is undefined behaviour.
> my point is, that this should be limited to the act of return (return with
> garbage, segfault,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #8 from Szüllő Ádám ---
Yes, the code as a whole is invalid.
But for(int i=0; i<4; i++) is well defined.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #7 from Jonathan Wakely ---
It isn't well-defined code though. It's undefined, as you yourself said. It
can't be both.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #6 from Szüllő Ádám ---
I'd bothered to read the articles, and there were no new information (nor
relevant to this exact case).
You are right that this is not a bug, becasue the code is invalid, as myself
emphasized too in the descri
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #5 from Jakub Jelinek ---
If you'd bothered to read the link I've provided (actually all 3 parts of it),
maybe you'd understand. Anyway, bugzilla is for reporting bugs (there is none
on the compiler side), not for teaching users ho
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #4 from Szüllő Ádám ---
i understand that missing return value is undefined behaviour.
my point is, that this should be limited to the act of return (return with
garbage, segfault, stuck in an infinite loop _after_ the for loop)
wha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
--- Comment #2 from Szüllő Ádám ---
>There's nothing wrong here
how a missing retun statement corrupt an independent code block, with "private"
variable inside it's own scope?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
10 matches
Mail list logo