Minor arm cleanup

Andreas Schwab schwab@suse.de
Mon Nov 1 15:35:00 GMT 1999


Richard Earnshaw <rearnsha@arm.com> writes:

|> > 
|> > We generally frown upon lower-case macros.
|> > 
|> > This change changes the bad_pc and bad_args macros to be upper case.  That's
|> > it.
|> > 
|> > 	* tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and BAD_PC
|> > 	respectively.
|> 
|> Hmm, When I wrote this originally, bad_args and bad_pc were variables, so 
|> that compilers (eg sparcworks) that didn't put strings into read-only 
|> sections wouldn't generate dozens of duplicate strings.  My guess is that 
|> with the change to internationalize the strings this "optimization" was 
|> lost.

I'd guess the problem was that bad_args and bad_pc were global variables,
initialized with the string, which does not work as such with gettext (you
have to translate at runtime).

You can restore the old behaviour by using the N_ macro to mark the string
at file scope, and put _() around every use of the variables.  But then,
it's probably not worth the hassle.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


More information about the Binutils mailing list