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

--- Comment #2 from Vadim Zeitlin <vz-gcc at zeitlins dot org> ---
FWIW I think it's a rather useful warning as allocating 0 bytes is rarely
intentional, i.e. I haven't seen any false positive occurrences of this warning
in my own code. And in valarray case, it indicates a small but real problem
too: empty valarray shouldn't allocate memory at all, not allocate 0 bytes.

And AFAICS it would be pretty trivial to fix the warning in valarray code (but
I have never contributed to libstdc++ so I don't know how to do it and don't
volunteer to do it neither).

Reply via email to