On Mon, 24 Jun 2019 17:53:48 -0600
Jeff Law <l...@redhat.com> wrote:

> On 6/24/19 4:25 AM, Jozef Lawrynowicz wrote:
> > 
> > diff --git a/gcc/brig/brig-lang.c b/gcc/brig/brig-lang.c
> > index 91c7cfa35da..be853ccbc02 100644
> > --- a/gcc/brig/brig-lang.c
> > +++ b/gcc/brig/brig-lang.c
> > @@ -864,10 +864,12 @@ brig_build_c_type_nodes (void)
> >        for (i = 0; i < NUM_INT_N_ENTS; i++)
> >     if (int_n_enabled_p[i])
> >       {
> > -       char name[50];
> > +       char name[25], altname[25];
> >         sprintf (name, "__int%d unsigned", int_n_data[i].bitsize);
> > +       sprintf (altname, "__int%d__ unsigned", int_n_data[i].bitsize);  
> So isn't this going to cause problems with targets where a plain int is
> 64 bits and the sprintf format checking patches?  In that case it's
> going to have to assume the numeric part is 20 characters  + 5 more for
> the __int and you've overflowed.
> 
> Why not just keep the size at 50 bytes?
> 
> Similarly in a few other places where you made similar changes.

Thanks, yes that was just an oversight where I thought I could save some space
for "free".
> 
> It looks fine with that fixed.

Fixed and applied.

Thanks,
Jozef
> 
> jeff

Reply via email to