Date: Mon, 16 Feb 2009 17:07:16 +1100 From: Andrew Reilly <andrew-freebsd@areilly.bpc-users.org> To: Christoph Mallon <christoph.mallon@gmx.de> Cc: Michael Butler <imb@protected-networks.net>, Andriy Gapon <avg@icyb.net.ua>, Bruce Simpson <bms@incunabulum.net>, freebsd-current@freebsd.org Subject: Re: weeding out c++ keywords from sys/sys Message-ID: <20090216060716.GC70145@duncan.reilly.home> In-Reply-To: <49985AEE.1010709@gmx.de> References: <4995BB1B.7060201@icyb.net.ua> <20090213231513.GA20223@duncan.reilly.home> <4997F105.5020409@icyb.net.ua> <499811DF.6030905@incunabulum.net> <20090215151318.0d17bfb9@ernst.jennejohn.org> <49983868.5010107@incunabulum.net> <20090215182420.774b90c3@ernst.jennejohn.org> <49985807.805@protected-networks.net> <49985AEE.1010709@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 15, 2009 at 07:11:58PM +0100, Christoph Mallon wrote: > Michael Butler schrieb: > > .. stops C++ from mangling the prototyped functions so they'll link > >correctly but does it temporarily disable the "reserved word" tests? > >Should it? ;-) > > No, it doesn't. extern $STRING (the standard only requires "C" and > "C++", but there can be more) just changes the linkage of declarations > (name mangling, calling convention). I've always wondered: why does the extern "C" {} cruft have to be pushed into all C headers, rather than being wrapped around the #include <> lines in the C++ source that includes them? Then you wouldn't need the #ifdef __cplusplus conditional, because you already know that it's C++ code. Common usage seems to have it backwards, but I assume that there must be a reason. Cheers, Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090216060716.GC70145>