[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171012112959.4d2310a8@alans-desktop>
Date: Thu, 12 Oct 2017 11:31:01 +0100
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: David Woodhouse <dwmw2@...radead.org>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix C++ kernel in include/linux/mtd/mtd.h
On Fri, 06 Oct 2017 13:25:55 +0100
David Woodhouse <dwmw2@...radead.org> wrote:
> On Fri, 2017-10-06 at 14:13 +0200, Pavel Machek wrote:
> > > You can change 'C++' to 'C99' too, while you're at it :)
> >
> > No. They are C++ comments... as in... dangerous infection that came
> > from C++. Yes, C99 is infected, too, but still C++ is original source
> > of infection :-).
>
> C++ is a different language, and irrelevant here. You could call them
> Java comments if you want, but that would be equally silly. In the
> kernel, they are C99 comments. Valid, but not our preferred style
> (which is fair enough, unlike our idiotic refusal to use C99 integer
> types).
We might as well allow them. We are using those compiler settings so the
cases where your compilation produces different results in C99 and more
classic C are no longer a risk 8)
int main(int argc, char *argv[])
{
int x = 1//**/
-1;
if (x == 0)
puts("Ewww C99");
exit(0);
}
Powered by blists - more mailing lists