[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #10 from Martin Sebor --- Author: msebor Date: Mon Dec 18 22:49:57 2017 New Revision: 255790 URL: https://gcc.gnu.org/viewcvs?rev=255790&root=gcc&view=rev Log: PR middle-end/83373 - False positive reported by -Wstringop-overflow PR t

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-13 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #9 from Daniel Fruzynski --- Thanks for explanation. In addition to allocation on stack, my app also uses custom allocator function like below. So in this case it also should work as expected. void* msg_alloc(int msg_id); ... Msg* m

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #8 from Martin Sebor --- GCC treats the last member array of a [sub]object as a flexible array member only if it doesn't know the size of the whole object (the subobject can be a member of a larger struct or an element of an array).

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-13 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #7 from Daniel Fruzynski --- In my case structures like Msg above are generated from IDL files together with code for serialization and deserialization. Because of this I cannot freely move or add new fields there, this may break comp

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-13 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #6 from Daniel Fruzynski --- My understanding is that after this patch will be applied, gcc will still emit warning for last field in struct, e.g. like in code below. Is my understanding correct or I missed something? struct Msg {

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #5 from Martin Sebor --- I'm not sure I follow what you mean by "I cannot reorder fields or add a new one at the end to silence this warning." The patch doesn't rely on any particular ordering of data members to suppress warnings. O

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-12 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 --- Comment #4 from Daniel Fruzynski --- > Bug 83373 - False positive reported by -Wstringop-overflow, is > another example of warning triggered by a missed optimization > opportunity, this time in the strlen pass. The optimization > is discusse

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #3 from Martin Sebor -

[Bug middle-end/83373] False positive reported by -Wstringop-overflow

2017-12-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83373 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at