This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g77 character strings are not terminated?
- From: mmcohen at ranx dot ucsc dot edu
- To: gcc at gcc dot gnu dot org
- Cc: mmcohen at ranx dot ucsc dot edu
- Date: Thu, 30 Jan 2003 14:43:38 -0800
- Subject: g77 character strings are not terminated?
- Reply-to: mmcohen at ranx dot ucsc dot edu
In every other f77 system I've used if one creates
a string like 'a b c', the result is null terminated.
With g77 this seems not to be the case, so it's impossible
to find the end of a string, unless one explicitly
gives the string as 'a b c\0'. However I've got
a zillion lines of code that expect a null.
Is this really what is intended in g77? Is there
a compiler flag to set to get null terminated
strings? Or is this a bug to be rectified?
Please cc me on any replies.
Thanks, MMCohen
PS. system is mandrake 9.0
test program is http://mambo.ucsc.edu/psl/lrt.f