https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|8.4 |8.5
--- Comment #5 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
--- Comment #4 from Martin Sebor ---
Modifying const members of a struct is undefined, regardless of how it's done:
either by assignment or by overwriting it using memset. GCC doesn't diagnose
it yet but I expect it will, maybe as early as in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
--- Comment #3 from Ryan Libby ---
(In reply to Martin Sebor from comment #2)
> Replacing the memset call with the assignment '*p = (struct s){ 0 };' avoids
> the warning and also results in better/optimal code. (As suggested in
> pr36602, that
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
Martin Sebor changed:
What|Removed |Added
Keywords||missed-optimization
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|