Thanks for your reply,
I agree, but seeing how old the issue is, I don't know how fast it will be fixed.
I noticed it's not really fixable when compiling with -O2, it behaves differently from -O0. At least I didn't find a reliable way (except for ignoring realloc failure)
There is already a bunch of gcc tickets regarding Wuse-after-free issues, see meta bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104075
I think the closest to our case is https://gcc.gnu.org/bugzilla/show_bug.cgi? id=106578
Regards, Fabian Maurer
On Samstag, 10. Juni 2023 10:17:39 CEST you wrote:
Is this worth it or would you wait for gcc to fix their warning?
I asked my self the very same question...
given the very low number of warnings from GCC12 (compared to what we got with GCC11) and their false positive nature, I'd rather pick the wait and see road
perhaps opening a GCC ticket could be useful (so we'd know if there's a chance for a fix or if we'll have to fix it on our side)
(reminder: if nothing is done, Alexandre will fix it when he upgrades his compiler as he compiles with -Werror)
A+