[Bug bootstrap/58289] gcc/gengtype.c includes gcc/double-int.h, which uses C++ constructs
jklowden at schemamania dot org
gcc-bugzilla@gcc.gnu.org
Mon Sep 2 03:37:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58289
--- Comment #2 from James K. Lowden <jklowden at schemamania dot org> ---
(In reply to Andrew Pinski from comment #1)
> GCC is now a C++ program even though it uses the .c file extension. Use
> clang in C++ mode instead.
Thank you, but the the problem is not completely solved.
1. This is not mentioned anywhere in
http://gcc.gnu.org/install/configure.html.
2. Not all .c files needed to build gcc are C++. Setting Clang to compile
all files as C++ means libiberty cannot be compiled:
../../../libiberty/sha1.c:235:11: error: '<anonymous struct at
../../../libiberty/sha1.c:235:11>' can not be defined in a type specifier
The compiler has precious little information to tell it what language to use.
How to distinguish between C and C++ if not by the extension? Particularly in
a project with both C and C++ source files among its build-time dependencies?
More information about the Gcc-bugs
mailing list