This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [mainline] PATCH to diagnostic.[hc]
On Sat, Jun 28, 2003 at 03:40:11PM +0200, Gabriel Dos Reis wrote:
> Index: diagnostic.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
> retrieving revision 1.118
> diff -p -r1.118 diagnostic.c
> *** diagnostic.c 23 Jun 2003 15:27:35 -0000 1.118
> --- diagnostic.c 28 Jun 2003 13:37:29 -0000
> *************** output_format (output_buffer *buffer, te
> *** 497,513 ****
> if (*text->format_spec == '\0')
> break;
>
> ! /* We got a '%'. Let's see what happens. Record whether we're
> ! parsing a long integer format specifier. */
> ! if (*++text->format_spec == 'l')
> ! {
> ! long_integer = true;
> ! ++text->format_spec;
> ! }
>
> - /* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %m, %o, %s, %u,
> - %x, %p, %.*s; %%. And nothing else. Front-ends should install
> - printers to grok language specific format specifiers. */
> switch (*text->format_spec)
> {
> case 'c':
> --- 469,495 ----
> if (*text->format_spec == '\0')
> break;
>
> ! /* We got a '%'. Parse precision modifiers, if any. */
> ! switch (*++text->format_spec)
> ! {
> ! case 'w':
> ! wide = true;
> ! ++text->format_spec;
> ! break;
> !
> ! case 'l':
> ! do
> ! ++precision;
> ! while (*++text->format_spec == 'l');
> ! break;
> !
> ! default:
> ! break;
> ! }
> ! /* We don't support precision behond that of "long long". */
^^^^^^
"beyond"
> ! if (precision > 2)
> ! abort();
>
> switch (*text->format_spec)
> {
> case 'c':
--
Matt Kraai kraai@alumni.cmu.edu Debian GNU/Linux