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: mrs at windriver dot com (mike stump)
- Cc: jbuck at synopsys dot COM, rth at redhat dot com,florian at edamail dot fishkill dot ibm dot com, gcc at gcc dot gnu dot org,guillaume dot thouvenin at polymtl dot ca, zack at codesourcery dot com
- Date: Fri, 30 Nov 2001 17:12:41 -0800 (PST)
- Subject: Re: fdump-ast-original and strg:
I wrote:
> > > if the option of simply calling an existing string-emitting function
> > > exists [it should be used].
From: Richard Henderson <rth@redhat.com>
> > Unfortunately there is no such function. That stuff is
> > replicated 99 times in various header files.
Mike Stump writes:
> output_quoted_string in toplev.c, should be half way reasonable.
Well, it only treats '"' and '\\' specially (by prepending a \ ), all
other characters (including control characters) go straight to output.
If the only purpose of the patch is to make it possible to read the file
back in, I suppose it could be good enough, but I think that the dump
should look reasonable for the traditional
int main() {
printf("Hello, world\n");
}
and output_quoted_string will write
"Hello, world
"