This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to provide a default for ASM_OUTPUT_INTERNAL_LABEL
> From: Daniel Jacobowitz <drow@mvista.com>
>
> On Sat, Aug 31, 2002 at 10:10:18AM -0700, Richard Henderson wrote:
> > On Sat, Aug 31, 2002 at 09:39:37AM -0400, Kaveh R. Ghazi wrote:
> > > > I don't see that using alloca here is effective at all.
> > >
> > > Why not? I've seen buffers used in dwarf2out.c hardcoded at 20 bytes.
> > > So 40 + strlen (PREFIX) should be plenty, no?
> >
> > Yeah, but so would a constant 64.
> >
> > > I think snprintf is supposed to return the length of what would have
> > > been output even when you would have exceeded the max, not -1.
> >
> > Hum. I was just going by what the Linux man page sez.
> >
> > > Not all platforms do this correctly though, on irix6.5 it returns the
> > > truncated printed length. So you'll never know that you would have
> > > exceeded the supplied length by checking the return type.
> >
> > Blah. Perhaps an argument for using the libiberty snprintf
> > in that case?
>
> Perhaps. Certainly you can't assume the system snprintf gets it right,
> since I think I've seen at least three different results.
Curious, what was the third variation, and where did you see it?
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu