This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] un-nest findidx()


On 07/25/2014 03:19 PM, Konstantin Serebryany wrote:
> I certainly don't care which way to choose, but a quick grep shows
> that both  styles are frequent:

This isn't quite an apples-to-apples comparison.

For commenting conditionals I think it's overwhelmingly
the case that the closing #endif contains the conditional
that was true for that branch.

The case of conditionals that are file inclusion guards
is unique though, and it turns out I'm wrong here. In this
case the overwhelming majority close out the conditional
with the name of the file. This makes sense since it gives
the most information to the developer that it is (a) an
inclusion guard and (b) which file. The down side being
that if the file is moved you need to update the inclusion
guard comment.

I think both are acceptable and I've commented as such in
the Style and Conventions guide.

https://sourceware.org/glibc/wiki/Style_and_Conventions#Commenting_.23endif

I retract my statement that I'd change your patch.

Cheers,
Carlos.


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