From aa087a665ac755fb932610ba6ade2e7af7aeff9d Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 24 Oct 2008 10:18:39 +0200 Subject: [PATCH] doc/gnulib.texi (Header files): Add note about C++ problems. --- ChangeLog | 5 +++++ doc/gnulib.texi | 5 +++++ 2 files changed, 10 insertions(+) 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 -- 2.11.0