https://sourceware.org/bugzilla/show_bug.cgi?id=21850
Bug ID: 21850 Summary: ifdef __cplusplus needed Product: binutils Version: 2.29 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: barry_davis at stormagic dot com Target Milestone: --- This needs an ifdef around it as it causes build failures when __cplusplus is not defined and -Wundef -Werror are used. I'm using gcc 4.8.4 /usr/include/ansidecl.h: 331#if __cplusplus >= 201103 332/* C++11 claims to be available: use it. final/override were only 333 implemented in 4.7, though. */ 334# if GCC_VERSION < 4007 335# define OVERRIDE 336# define FINAL 337# else 338# define OVERRIDE override 339# define FINAL final 340# endif 341#elif GCC_VERSION >= 4007 342/* G++ 4.7 supports __final in C++98. */ 343# define OVERRIDE 344# define FINAL __final 345#else 346/* No C++11 support; leave the macros empty: */ 347# define OVERRIDE 348# define FINAL 349#endif 350 351#ifdef __cplusplus 352} 353#endif 354 355#endif /* ansidecl.h */ My build failure: CC /opensource/.smx_x86_64/linux-4.9/_x86_64/tools/perf/util/srcline.o In file included from /opensource/.smx_x86_64/binutils-2.29/_install/usr/include/bfd.h:42:0, from util/srcline.c:21: /opensource/.smx_x86_64/binutils-2.29/_install/usr/include/ansidecl.h:331:5: error: "__cplusplus" is not defined [-Werror=undef] #if __cplusplus >= 201103 ^ cc1: all warnings being treated as errors -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils