From: Simon Josefsson Date: Fri, 24 Oct 2008 08:18:39 +0000 (+0200) Subject: doc/gnulib.texi (Header files): Add note about C++ problems. X-Git-Tag: v0.1~6778 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=aa087a665ac755fb932610ba6ade2e7af7aeff9d;p=gnulib.git doc/gnulib.texi (Header files): Add note about C++ problems. --- diff --git a/ChangeLog b/ChangeLog index cd514df37..c32c1ebe8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-24 Simon Josefsson + + * doc/gnulib.texi (Header files): Add note about C++ problems. + Explained by Bruno Haible . + 2008-10-23 Bruno Haible Define a dummy SA_NODEFER macro on Interix. diff --git a/doc/gnulib.texi b/doc/gnulib.texi index e4f0beda5..e98f124c4 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -199,6 +199,11 @@ preference might depend on whether you consider the API exported by your header file as something available for C programs only, or for C and C++ programs alike. +Note that putting a @code{#include} in an @code{extern "C" @{ ... @}} +block yields a syntax error in C++ mode on some platforms. For this +reason, it is recommended to place the @code{#include} before the +@code{extern "C"} block. + @subheading Include ordering When writing a gnulib module, or even in general, a good way to order