This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Plan for cleaning up the "Addressing Modes" macros
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "'Kazu Hirata'" <kazu at cs dot umass dot edu>, <gcc at gcc dot gnu dot org>
- Date: Mon, 28 Feb 2005 12:46:41 -0800
- Subject: Re: RFC: Plan for cleaning up the "Addressing Modes" macros
- References: <SERRANOFRaqbC8wSA1X00000026@SERRANO.CAM.ARTIMI.COM>
"Dave Korn" <dave.korn@artimi.com> writes:
> I'm basically in agreement with you here, and just want to suggest you can
> avoid an awful lot of code duplication by doing something like
>
> #ifdef REG_OK_STRICT
> #define ${CPU}_IS_STRICT 1
> #else
> #define ${CPU}_IS_STRICT 0
> #endif
This idiom is in common use already, and from the point of view of the
conversion, I think it'll make things *harder*, because - just like
any macro whose value depends on REG_OK_STRICT and is used in other
macros that aren't defined in #ifdef REG_OK_STRICT blocks - it makes
it impossible to grep for REG_OK_STRICT and find all affected macros.
Now, this is a preexisting condition, but I'm really not wanting to
make it worse.
zw