Re: [PATCH] Avoid C++ comments, use C comments instead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On Mon, 2006-07-10 at 13:41 +0200, Olivier Galibert wrote:
> Supporting old, not-standard-anymore compilers has a cost in
> maintainability, by precluding the use of better constructs (//
> comments, declarations near initialisation, struct initializers...).
> Additionally, it gets harder and harder to have people test for them.

Sorry for one more addition to this thread.  I just want to clear some
misunderstanding.  The whole point of fixing the comments is to make is
easier to test for other compatibility issues using gcc.

For gcc to report post-c89 features, "-pedantic -std=c89" should be
supplied.  This option makes gcc report the c99 comments as errors and
other c99 features as warnings.  The errors would stand in the way of
finding the warnings.

I'm not saying all non-c89 constructs should be fixed, but if we get a
report that some feature is not working with some compiler, we could
compile git with "-pedantic -std=c89", find corresponding warnings and
fix them.  The comments would stand in the way for somebody using gcc.

-- 
Regards,
Pavel Roskin

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]