Re: including sparse headers in C++ code

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

 



On Sunday 10 October 2010 13:41:59 Bernd Petrovitsch wrote:
> On Sam, 2010-10-09 at 14:46 -0700, Christopher Li wrote:
> > On Sat, Oct 9, 2010 at 1:59 PM, Josh Triplett <josh@xxxxxxxxxxxxxxxx> 
wrote:
> > > It seems reasonable to avoid the use of C++ keywords in Sparse
> > > *headers* (though unnecessary in *source*).  Looks like this will
> > > primarily cause pain due to "enum namespace" and the various places
> > > using it.  Seems easy enough to change those all to "ns".  "new" mostly
> > > seems to get used as a parameter name or local variable name; for the
> > > former we could omit it, and for the latter we could trivially call it
> > > something more specific like "newlist" or "newptr".
> > >
> > > So, I'd tend to guess "patches welcome" (again, for headers only, plus
> > > minimal corresponding source changes when required).  I wouldn't
> > > anticipate other Sparse developers objecting strongly, but if they do
> > > your mail seems like the right way to find out.  The various reasons
> > > given for *not* making the Linux kernel headers compatible don't seem
> > > to apply here, though.
> >
> > Well said. I don't expect sparse to compile in the C++ mode. Making
> > sparse header usable in C++ seems reasonable to me.
>
> Well, sparse uses C99.
> If one #include's <stdbool.h> at some day (as I did;-), than "true" and
> "false" don't work any longer that good as variable names.

The clash of sparse headers with <stdbool.h> should be already fixed:

http://git.kernel.org/?p=devel/sparse/sparse.git;a=commitdiff;h=0be55c9

Kamil
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux