This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/33079] Optional empty strings do not appear to be 'PRESENT'
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2007 14:22:43 -0000
- Subject: [Bug libfortran/33079] Optional empty strings do not appear to be 'PRESENT'
- References: <bug-33079-10601@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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