This is the mail archive of the gcc-patches@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]

Re: [gfortran] Minor cleanup: add gfc_conv_cstring_const


On Monday 27 September 2004 19:47, Tobias Schlüter wrote:
> 2004-09-27 ?Tobias Schlueter ?<tobias.schlueter@physik.uni-muenchen.de>
>
> ????????* trans-const.c (gfc_build_cstring_const): New function.
> ????????(gfc_init_cst): Use new function.
> ????????* trans-const.h (gfc_build_cstring_const): Add prototype.
> ????????* trans-io.c (set_string, set_error_locus): Use new function.
> ????????* trans-stmt.c (gfc_trans_goto): Use new function.
 ?
> +/* Build a string constant from a zero-terminated string. ?*/
> +
> +tree
> +gfc_build_cstring_const (const char *s)
> +{
> + ?return gfc_build_string_const (strlen (s) + 1, s);
> +}
> +

This comment needs to be a bit more explicit. Mention that the constant does 
include the null terminator, ie. is a C style null-terminated string, for a 
Fortran character constant. Basically make it clear that it's a feature, not 
a bug ;)

Ok with that change.

Paul


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