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]

RFC: Remove %A, %B and %L from error messages


Hi Guys,

  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.
  
  So, what do people think ?  Are there any objections to this idea ?

Cheers
  Nick

PS.  I am not planning on changing the info, einfo and minfo functions
  in the bfd_link_callbacks structure as this is exported and used
  outside of the BFD library.

PPS.  The attached patch only covers the source files in the bfd
  directory.  The real patch includes replacing all of the %A, %B
  and %L operators in all of the translations in the bfd/po directory
  as well.  But this patch is huge - 344K compressed - so I have
  not attached it here.

Attachment: attribute-fprintf.patch.2.xz
Description: application/xz


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