https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114285

--- Comment #12 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
At -O1 and above, or with -fno-analyzer-state-merge, -fanalyzer emits the
uninit warning:
  https://godbolt.org/z/oTYq3x9sj

I do expect the analyzer to emit the warning in this case, in terms of how the
analyzer warning is implemented.

I wonder if we could/should have some kind of builtin that copies uninit while
preserving the "uninitializedness" of it?  (i.e. copy uninit without warning
about it, but keep the bytes in the destination marked as "uninit").  Perhaps
using that could resolve this issue?  (not sure, am brainstorming here)

Reply via email to