On Mon, Oct 10, 2011 at 7:47 AM, Paolo Carlini <paolo.carl...@oracle.com> wrote:
> On 10/10/2011 02:13 PM, Paolo Carlini wrote:
>>
>> . looks like we want to do something else, not printing the number at all.
>> See audit trail.
>
> An option, for 4.7 at least, would be, instead of just closing 33067 as a
> duplicate of the much more general 49152, doing something like:
>
> Index: c-family/c-pretty-print.c
> ===================================================================
> --- c-family/c-pretty-print.c   (revision 179745)
> +++ c-family/c-pretty-print.c   (working copy)
> @@ -1019,7 +1019,7 @@ static void
>  pp_c_floating_constant (c_pretty_printer *pp, tree r)
>  {
>   real_to_decimal (pp_buffer (pp)->digit_buffer, &TREE_REAL_CST (r),
> -                  sizeof (pp_buffer (pp)->digit_buffer), 0, 1);
> +                  sizeof (pp_buffer (pp)->digit_buffer), 6, 1);
>   pp_string (pp, pp_buffer(pp)->digit_buffer);
>   if (TREE_TYPE (r) == float_type_node)
>     pp_character (pp, 'f');
>
> which gives:
>
> 33067.C:2:18: error: no match for ‘operator<’ in ‘1.1e+0 < t’
>
> Given in particular that we now have column numbers, as a user of GCC I
> would certainly consider it a good improvement.
>
> Just let me know...

on this particular input, '6' looks OK.  However, the
question is why '6'?
Why can't we retain the original number spelling from the
source code and use that instead?

Reply via email to