This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix C++ debug tests


On Thu, 9 Feb 2017, Wilco Dijkstra wrote:

> The internal header include/string.h does not work in C++: it causes 
> link errors in several C++ debug tests when any of the functions it 
> declares are called. The best option would be to not use internal 
> headers for tests (unless explicitly needed).  As a workaround for now, 
> add extern "C" {} to the C++ debug tests.

I think extern "C" belongs around specific declarations in headers, not 
around whole source files.  I'd suggest disabling the internal 
declarations if __cplusplus instead (just as they are disabled for 
_ISOMAC).

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]