This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix C++ debug tests
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Thu, 9 Feb 2017 17:17:02 +0000
- Subject: Re: [PATCH] Fix C++ debug tests
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0802MB2610B1B8A87C86F60188E7C583900@AM5PR0802MB2610.eurprd08.prod.outlook.com> <AM5PR0802MB26104FB45A8DAA0359769B2383450@AM5PR0802MB2610.eurprd08.prod.outlook.com>
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