This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Factor out uses of TYPE_ASM_OP and SIZE_ASM_OP
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jul 2002 22:54:08 -0700
- Subject: Re: RFC: Factor out uses of TYPE_ASM_OP and SIZE_ASM_OP
- References: <200207222231.SAA19870@caip.rutgers.edu>
On Mon, Jul 22, 2002 at 06:31:13PM -0400, Kaveh R. Ghazi wrote:
> > From: Zack Weinberg <zack at codesourcery dot com>
> >
> > I'm testing the patch right now: I intend to do an x86-linux bootstrap
> > and build cross compilers to each affected target. However, I would
> > appreciate comments at this stage, too.
>
> When possible, please consider constifying all variables in the macros
> you touch. E.g. in the above, `name' (and `size' if the decl is moved
> into the inner scope) can be constified.
>
> IMHO, explicitly marking something const is more clear than scanning
> the code with your eye. Plus it might help optimize some situations.
I don't see that there's a huge gain and I've already given myself a
case of typist's cramp doing this much. If you would like to do
something along those lines - ideally as part of further extractions
of duplicate code - feel free.
zw