This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ADA Patch] Handle %qs in GNAT's bug box
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Gabriel Dos Reis <gdr at integrable-solutions dot net>,"Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Mon, 27 Jun 2005 10:52:47 +0200
- Subject: Re: [ADA Patch] Handle %qs in GNAT's bug box
- References: <Pine.LNX.4.44.0505031003310.17660-100000@www.eyesopen.com>
I haven't seen any comment on this patch, so in case nobody opposed
to this change, it looks OK to me.
> The following patch to the Ada front-end implements Joseph Myers'
> suggestion that front-ends should use the appropriate pretty printer
> functionality to handle %qs, %w etc. in GCC's error messages rather
> than avoid using them in the middle-end.
> http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00062.html
[...]
> The following patch has been tested on i686-pc-linux-gnu with a bootstrap
> including C and Ada, and a full testsuite run, including ACATS, with no
> new regressions. Gaby could you confirm that I'm using the correct
> pretty-printer functions and idioms, to simplify the Ada folks' review?
> Admittedly, I'm subverting the constness of pp_formatted_text, but it
> isn't clear whether Ada's Strings don't have to be NUL terminated, and
> allocating yet another buffer to truncate the string at newline looked
> like a waste.
Ada's strings certainly do not have and never are NUL terminated (they may
contain NUL characters though, which is different).
Arno