[parisc-linux] [patch] Remove magic constant from gas/tc-hppa.c

Jeff Bailey jbailey at raspberryginger.com
Sat Oct 21 15:34:06 MDT 2006


Le samedi 21 octobre 2006 à 15:44 -0400, John David Anglin a écrit :
> > I opted for eliminating the DEFAULT_LEVEL because it's not clear at a
> > glance what it's a level of, it's only used in that one place, and the
> > construct isn't used in any of the other architectures.
> 
> See pa_level.  The magic numbers end up in the .o files.  The hpux
> linker will issue errors and warnings if you try to link an inconsistent
> set of object files.  The values appear in various places such as
> bfd/archures.c, bfd/libhppa.h, ...

Sorry, I don't mean that the magic number is only used in that one
place, rather that the constant DEFAULT_LEVEL is only used in that one
place.  pa_level just uses the magic numbers directly (as fixed by the
updated patch):


2006-10-21  Jeff Bailey  <jbailey at raspberryginger.com>

        * config/tc-hppa.c: Do not define DEFAULT_LEVEL.
        (need_pa11_opcode): Use bfd_mach_hppa11 instead of pa11 for
        consistency.
        (pa_level): Use defines from bfd.h instead of magic numbers.
        (md_begin): Use defines from bfd.h instead of DEFAULT_LEVEL.



--
Jeff Bailey - http://www.raspberryginger.com/jbailey/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc-hppa.c.diff
Type: text/x-patch
Size: 2758 bytes
Desc: not available
Url : http://lists.parisc-linux.org/pipermail/parisc-linux/attachments/20061021/8bad58f3/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.parisc-linux.org/pipermail/parisc-linux/attachments/20061021/8bad58f3/attachment-0002.pgp 


More information about the parisc-linux mailing list