[gfortran,patch] Correctly NULL-terminate character constant strings
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue Oct 31 15:41:00 GMT 2006
Hi,
François-Xavier Coudert <fxcoudert@gmail.com> wrote on Tue, 31 Oct 2006:
> Attached patch corrects a few functions which did not correctly
> NULL-terminate value.character.string for CHARACTER constants.
> Although it appears that this NULL-termination was not required when
> the front-end was first written, a few places now rely on it, and I
> don't think it's too bad to accomodate them. I've tried to review and
> fix not only the problem in the original PR, but all other such
> places.
Fortran strings can contain '\0', so assuming that '\0' is the string
termination character may lead to problems. Does code, which is not
there for debugging only, depend on NUL-termination of strings?
- Tobi
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Fortran
mailing list