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 Tue, 14 Feb 2017, Wilco Dijkstra wrote:

> Joseph Myers wrote:
> > 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).
> 
> Yes that's a good idea. I've updated the patch to change the header instead:
> 
> 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).  Add guards so that it is safe to use include/string.h from C++.
> 
> ChangeLog:
> 2017-02-14  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	* include/string.h: Add __cplusplus check.

OK.

-- 
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]