This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Conditionalize INO handling for VMS

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]