This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Better messages for discarde section


On Tue, Jun 03, 2003 at 05:46:25PM +0100, Nick Clifton wrote:
> 
> 
> >> > -error_handler VPARAMS ((int id ATTRIBUTE_UNUSED, const char *fmt, ...))
> >> > +error_handler (int id, const char *fmt, ...)
> >> >  {
> >> > -  VA_OPEN (arg, fmt);
> >> > -  VA_FIXEDARG (arg, const char *, fmt);
> >> 
> >> Please do not remove the V.... macros. We have not switched over to
> >> using IsoC.  (Well not yet anyway). 
> >
> > I am not sure if I have a choice here since va_copy is used, which
> > is not available in K&R C.
> 
> Why are you using va_copy ?  If it is only because of the recursive
> call to einfo() inside your new code, then it might be cleaner to just
> set a flag and then tail-call einfo at the end of the function.  That
> way it should work with K&R as well.

I used va_arg, which will advance arg. I changed my code to pass
another symbol name so that I can check if a warning has been
issued before.

> 
> 
> > +    case -LD_DEFINITION_IN_DISCARDED_SECTION:
> > +    case LD_DEFINITION_IN_DISCARDED_SECTION:
> 
> What is the purpose of the negative version of
> LD_DEFINITION_IN_DISCARDED_SECTION ?  Does anything use it ?  Assuming
> that it is needed, it ought to be documented in a comment somewhere.
> 

No one uses it yet. I can image we add "ld dicardisnotfatal" or
something like that.


H.J.

Attachment: binutils-discard.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]