[Bug libfortran/33079] Optional empty strings do not appear to be 'PRESENT'
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 15 14:22:00 GMT 2007
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-08-15 14:22 -------
(In reply to comment #2)
> Why do you need to special case len == 0? The other strings aren't NUL
> terminated either.
The zero-termination is just a detail to avoid keeping memory uninitialized.
The thing is that *dest should not be NULL, and malloc(0) will return NULL.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33079
More information about the Gcc-bugs
mailing list