Linux-kernel mailing list archive 1997-48,: Re: comment style

# Re: comment style

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 1 Dec 1997 08:51:03 +0000 (GMT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Brian Beaudoin: "Re: floppy0: Unable to allocate DMA memory"
- Previous message: Chris Wedgwood: "Re: comment style"
- In reply to: Albert D. Cahalan: "comment style"
- Next in thread: Theodore Y. Ts'o: "Re: comment style"

> -// priv->phyOnline = 1;
> +/* priv->phyOnline = 1; */
>
> The ISO has decided to make C++ comments legal in C.
> This means you should adjust your gcc config, not hack
> the nice new-style comments out of the kernel.

There are specific reasons for making this change. gcc might known that the
_draft_ ISO standard allows C++ comments, the code checking tools I have do
not. I've got nothing against the "new" (read as left out when B was written)
style comments.

> The ISO standardizes C, not obsolete gcc config files.

Wrong tense - you mean "will"

[related syntactic humour item]

It's also capable of causing different results for the same code depending
if that commenting is supported

int x;

x=2//**/
-1;

if(x==1)
{
printf("Compiled with a C++ compiler.. You lose\n");
exit(1);
}

- Next message: Brian Beaudoin: "Re: floppy0: Unable to allocate DMA memory"
- Previous message: Chris Wedgwood: "Re: comment style"
- In reply to: Albert D. Cahalan: "comment style"
- Next in thread: Theodore Y. Ts'o: "Re: comment style"