This is the mail archive of the binutils@sourceware.org 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: RFC: Remove %A, %B and %L from error messages


On Sun, Feb 18, 2018 at 03:20:23PM +0000, Maciej W. Rozycki wrote:
> Hi Nick,
> 
> >   I am considering applying the attached patch to remove the %A,
> >   %B format specifiers and the %L format qualifier from BFD error
> >   messages.  The reasons for doing this are twofold: 1) It allows the
> >   bfd_error_handler function to be annotated with ATTRIBUTE_PRINTF, thus
> >   helping to detect formatting problems; and 2) the strings can now be
> >   verified by msgfmt and the translation project's validation code,
> >   which will lead to better translations.  (Plus it should help avoid
> >   bugs like PR 22828).
> > 
> >   It does mean loosing the convenience of the %A, %B and %L operators,
> >   and replacing them with explicit function calls, but I think that it
> >   is worth it.
> 
>  I think it's not, as far as `%A' and `%B' are concerned.
> 
>  How about doing it the Linux way and replacing `%A' and `%B' with `%pA' 
> and `%pB' respectively?

That's a nice idea!  Very easy to implement too since the bulk of the
editing will just be a one line script invoking sed, at least if einfo
is changed as well.

Testing a patch.

-- 
Alan Modra
Australia Development Lab, IBM


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