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






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