This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Adjust output for strings in tree-pretty-print.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 May 2008 10:30:32 -0400
- Subject: Re: [RFC] Adjust output for strings in tree-pretty-print.c
- References: <19c433eb0805190659g7442d645ga7755ec598856463@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, May 19, 2008 at 02:59:16PM +0100, FX wrote:
> return (unsigned char *) "look\0here\0";
>
>
> Notice the added final '\0' in the C case; I don't know if it's bad to
> have it there, but I don't see a way to not output it and still have
> the correct output for Fortran (whose strings are not NUL-terminated).
Yes, it is bad to have it there for C/C++, please make sure the final
\0 isn't printed.
Jakub