This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Conditionalize INO handling for VMS
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 9 Dec 2001 18:36:16 -0800
- Subject: Re: Conditionalize INO handling for VMS
- References: <10112100214.AA16229@vlsi1.ultra.nyu.edu>
On Sun, Dec 09, 2001 at 09:14:53PM -0500, Richard Kenner wrote:
> Please move the #ifdef block to the top of the file, just after all
> the #includes.
>
> I think that would be much less clear given how local this is. What you
> propose makes sense if there are a bunch of them or if they are used in
> multiple places in the file but when there's only one use and it's this sort
> of detail, I think it's much easier to read if it's adjacent to its usage.
I suppose my brain works differently - for me, the #ifdef block breaks
up the flow of the routine, making it much harder to read.
> In the original patch, Doug had this right before the function, but I felt
> even those was too far away given the locality here.
This is a short function, I don't think right before is too far away.
I'd be fine with having it there.
But then it should be #undef-ed immediately after the function to make
clear that this is not a global utility.
> The other approach is to remove the macro altogether and just have
> the #ifdef in the code. Do you think that would be clearer?
No, that would be worse.
Hmm, we already need INO_T_CMP and INO_T_EQ over in cpplib - yet
another alternative would be to move all of these helpers into
system.h. This has the advantage of keeping all the ino_t hacks in
one place in case we need more of them in the future, and the
disadvantage that it's even farther away from the uses.
zw