This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/33079] Optional empty strings do not appear to be 'PRESENT'



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]