lkml.org 
[lkml]   [2013]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] kconfig: fix lists definition for C++
Rob, All,

On Mon, Apr 29, 2013 at 04:54:14PM -0500, Rob Landley wrote:
> On 04/29/2013 02:28:07 PM, Randy Dunlap wrote:
> >On 04/29/13 10:59, Yann E. MORIN wrote:
> >> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >>
> >> The C++ compiler is more strict in that it refuses to assign
> >> a void* to a struct list_head*.
>
> Given that the code _isn't_ C++ (because C is not a subset of C++ but a
> separate langauge in its own right where "throw" is a legitimate variable
> name and so on), how is this an issue?

It's an issue because the xconfig frontends is qconf, which as the name
implies is using Qt, which *is* C++, and includes list.h.

So, list.h is included by both by C and C++ code.

So yes, list.h can be compiled by a C++ compiler.

Now, granted: list.h should all be enclosed in:
ifdef __cpluplus
extern "C" {
endif
...
ifdef __cpluplus
}
endif

Was that the fix you were suggesting between the lines? ;-)

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'


\
 
 \ /
  Last update: 2013-04-30 01:21    [W:0.041 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site