This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fdump-ast-original and strg:
- From: Joe Buck <jbuck at synopsys dot COM>
- To: guillaume dot thouvenin at polymtl dot ca (Guillaume)
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 29 Nov 2001 19:00:44 -0800 (PST)
- Subject: Re: fdump-ast-original and strg:
Guillaume Thouvenin writes:
...
> The problem is the following. If you have something like:
>
> -- part of a C code --
>
> fprintf(stderr, "error strg: toto");
>
> --
>
> The asg given by gcc gives the following line:
>
> @247 string_cst type: @268 strg: error strg: toto lngt: 5
>
> So, I add a very basic modification inside GCC (in c-dump.c) and now, it
> produces this line:
>
> @247 string_cst type: @268 strg: "error strg: toto" lngt: 5
>
> It is easier to parse. So, I'd like to know if it can be added to official
> gcc futur release. It's only one line and for me it will be easier because
> people won't need to recompile the gcc compiler if they want to use my
> tool (ok for now I'm the only one who use it but it can change...).
This seems reasonable, but does your patch do the whole job? What happens
if the string contains newlines, control characters, or '"'? It would
seem reasonable to make the output match the input (that is, output \",
\n, etc).