From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Buck To: mrs@windriver.com (mike stump) Cc: jbuck@synopsys.COM, rth@redhat.com, florian@edamail.fishkill.ibm.com, gcc@gcc.gnu.org, guillaume.thouvenin@polymtl.ca, zack@codesourcery.com Subject: Re: fdump-ast-original and strg: Date: Fri, 30 Nov 2001 17:12:00 -0000 Message-ID: <200112010112.RAA14387@atrus.synopsys.com> References: <200112010056.QAA17559@kankakee.wrs.com> X-SW-Source: 2001-11/msg01668.html Message-ID: <20011130171200.VyIO7vbT6MLEXazMeekPT1-ieS5SZmkK5gjQUpXRnh4@z> I wrote: > > > if the option of simply calling an existing string-emitting function > > > exists [it should be used]. From: Richard Henderson > > 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 "