[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Mass rebuild status with gcc-4.3.0-0.4 of rawhide-20071220
- From: Jakub Jelinek <jakub redhat com>
- To: Development discussions related to Fedora <fedora-devel-list redhat com>
- Subject: Re: Mass rebuild status with gcc-4.3.0-0.4 of rawhide-20071220
- Date: Fri, 4 Jan 2008 06:32:28 -0500
On Fri, Jan 04, 2008 at 11:13:46AM +0100, Hans de Goede wrote:
> This is bad, as it breaks compatibility with including .c header files,
> really bad! Tom? Jakub?
C and C++ are different languages, there are many things valid in C and
invalid in C++ and vice versa. extern "C" is just a linkage thing, doesn't
magically change the source language temporarily to C.
So, if you want to include some header in C++, that header needs to be
includable in C++, i.e. must use the common subset of C and C++.
That includes stuff like not using C++ keywords (new, delete, ...),
adding casts where C++ doesn't allow implicit casting but C does,
and among yet other things for functions without arguments using type fn ();
or type fn (void), but not typedef void something; ... type fn (something);
in prototypes or fn definitions.
Jakub
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]