public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/63699] New: bootstrap fails with Apple clang 6.0
@ 2014-10-31 12:56 howarth at bromo dot med.uc.edu
2014-10-31 13:30 ` [Bug other/63699] " howarth at bromo dot med.uc.edu
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: howarth at bromo dot med.uc.edu @ 2014-10-31 12:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Bug ID: 63699
Summary: bootstrap fails with Apple clang 6.0
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: howarth at bromo dot med.uc.edu
Current gcc trunk fails to bootstrap on x86_64-apple-darwin14 (using the other
current proposed bootstrap patches for darwin) due to the following compiler
error against the clang 6.0 compilers...
make[4]: Entering directory
`/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/libcc1'
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../../gcc-5.0-20141029/libcc1 -I ../../gcc-5.0-20141029/libcc1/../include -I
../../gcc-5.0-20141029/libcc1/../libgcc -I .././gcc
-I../../gcc-5.0-20141029/libcc1/../gcc -I
../../gcc-5.0-20141029/libcc1/../gcc/c -I
../../gcc-5.0-20141029/libcc1/../gcc/c-family -I
../../gcc-5.0-20141029/libcc1/../libcpp/include -I/sw/include -I/sw/include
-W -Wall -fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c
-o plugin.lo ../../gcc-5.0-20141029/libcc1/plugin.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../gcc-5.0-20141029/libcc1 -I
../../gcc-5.0-20141029/libcc1/../include -I
../../gcc-5.0-20141029/libcc1/../libgcc -I .././gcc
-I../../gcc-5.0-20141029/libcc1/../gcc -I
../../gcc-5.0-20141029/libcc1/../gcc/c -I
../../gcc-5.0-20141029/libcc1/../gcc/c-family -I
../../gcc-5.0-20141029/libcc1/../libcpp/include -I/sw/include -I/sw/include -W
-Wall -fvisibility=hidden -g -MT plugin.lo -MD -MP -MF .deps/plugin.Tpo -c
../../gcc-5.0-20141029/libcc1/plugin.cc -fno-common -DPIC -o .libs/plugin.o
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:34:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/gcc-plugin.h:29:
../../gcc-5.0-20141029/libcc1/../gcc/coretypes.h:62:1: warning: class 'rtx_def'
was previously declared as a struct [-Wmismatched-tags]
class rtx_def;
^
../../gcc-5.0-20141029/libcc1/../gcc/coretypes.h:55:8: note: previous use is
here
struct rtx_def;
^
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:34:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/gcc-plugin.h:33:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/hash-set.h:24:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/hash-table.h:200:
../../gcc-5.0-20141029/libcc1/../gcc/ggc.h:315:15: warning: struct 'rtx_def'
was previously declared as a class [-Wmismatched-tags]
static inline struct rtx_def *
^
../../gcc-5.0-20141029/libcc1/../gcc/coretypes.h:62:7: note: previous use is
here
class rtx_def;
^
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:34:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/gcc-plugin.h:33:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/hash-set.h:24:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/hash-table.h:200:
../../gcc-5.0-20141029/libcc1/../gcc/ggc.h:318:11: warning: struct 'rtx_def'
was previously declared as a class [-Wmismatched-tags]
return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT);
^
../../gcc-5.0-20141029/libcc1/../gcc/coretypes.h:62:7: note: previous use is
here
class rtx_def;
^
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:40:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/tree-core.h:29:
In file included from ../../gcc-5.0-20141029/libcc1/../gcc/double-int.h:23:
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:370:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:377:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:384:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:394:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:401:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:411:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:422:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:886:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:965:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:1127:1: warning:
'fixed_wide_int_storage' defined as a class template here but previously
declared as a
struct template [-Wmismatched-tags]
class GTY(()) fixed_wide_int_storage
^
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:286:18: note: did you mean
class here?
template <int N> struct fixed_wide_int_storage;
^~~~~~
class
../../gcc-5.0-20141029/libcc1/../gcc/wide-int.h:1152:3: warning: extraneous
template parameter list in template specialization
template <>
^~~~~~~~~~~
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:40:
../../gcc-5.0-20141029/libcc1/../gcc/tree-core.h:1473:2: warning: struct
'symtab_node' was previously declared as a class [-Wmismatched-tags]
struct symtab_node *symtab_node;
^
../../gcc-5.0-20141029/libcc1/../gcc/ipa-ref.h:26:7: note: previous use is here
class symtab_node;
^
In file included from ../../gcc-5.0-20141029/libcc1/plugin.cc:58:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72:
error: use of undeclared
identifier 'do_not_use_isalnum_with_safe_ctype'
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return
isalnum(__c);}
^
../../gcc-5.0-20141029/libcc1/../include/safe-ctype.h:126:20: note: expanded
from macro 'isalnum'
#define isalnum(c) do_not_use_isalnum_with_safe_ctype
^
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/63699] bootstrap fails with Apple clang 6.0
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
@ 2014-10-31 13:30 ` howarth at bromo dot med.uc.edu
2014-11-05 5:47 ` andreast at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: howarth at bromo dot med.uc.edu @ 2014-10-31 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
--- Comment #1 from howarth at bromo dot med.uc.edu ---
Created attachment 33854
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33854&action=edit
proposed fix for compilation error against clang 6.0 compilers
The attached patch resolves the bootstrap compilation error on
x86_64-apple-darwin14 against the clang 6.0 (3.5svn) compilers.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/63699] bootstrap fails with Apple clang 6.0
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
2014-10-31 13:30 ` [Bug other/63699] " howarth at bromo dot med.uc.edu
@ 2014-11-05 5:47 ` andreast at gcc dot gnu.org
2014-11-07 8:42 ` fxcoudert at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu.org @ 2014-11-05 5:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Andreas Tobler <andreast at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andreast at gcc dot gnu.org
--- Comment #2 from Andreas Tobler <andreast at gcc dot gnu.org> ---
Cross compilation with clang is also affected.
amd64-*-freebsd* -> arm-*-freebsd* fails with the same error.
The snippet attached to this report 'solves' the issue for me. Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/63699] bootstrap fails with Apple clang 6.0
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
2014-10-31 13:30 ` [Bug other/63699] " howarth at bromo dot med.uc.edu
2014-11-05 5:47 ` andreast at gcc dot gnu.org
@ 2014-11-07 8:42 ` fxcoudert at gcc dot gnu.org
2014-11-07 8:43 ` [Bug bootstrap/63699] " fxcoudert at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-07 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
A minimal testcase for this is:
#include "safe-ctype.h"
#include <string>
with the safe-ctype.h from trunk. Apparently, the C++ header <string> uses the
type functions, which are poisoned by GCC's safe-ctype.h header. The proper
fix, in my opinion, is to include <string> before "safe-ctype.h", which is
itself included in gcc/system.h.
The same logic already appears in go/go-system.h, which says:
// We don't really need iostream, but some versions of gmp.h include
// it when compiled with C++, which means that we need to include it
// before the macro magic of safe-ctype.h, which is included by
// system.h.
Here's the suggested patch, which I can't test right now unfortunately. Feel
free to submit it for review:
Index: plugin.cc
===================================================================
--- plugin.cc (revision 217000)
+++ plugin.cc (working copy)
@@ -31,6 +31,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#include <string>
+
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
@@ -55,8 +57,6 @@
#include "connection.hh"
#include "rpc.hh"
-#include <string>
-
#ifdef __GNUC__
#pragma GCC visibility push(default)
#endif
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug bootstrap/63699] bootstrap fails with Apple clang 6.0
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
` (2 preceding siblings ...)
2014-11-07 8:42 ` fxcoudert at gcc dot gnu.org
@ 2014-11-07 8:43 ` fxcoudert at gcc dot gnu.org
2014-11-07 8:46 ` [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14 fxcoudert at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-07 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-07
Component|other |bootstrap
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
` (3 preceding siblings ...)
2014-11-07 8:43 ` [Bug bootstrap/63699] " fxcoudert at gcc dot gnu.org
@ 2014-11-07 8:46 ` fxcoudert at gcc dot gnu.org
2014-11-09 20:35 ` howarth at bromo dot med.uc.edu
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-07 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|bootstrap fails with Apple |Bootstrap fails in libcc1
|clang 6.0 |on darwin14
--- Comment #4 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Also, it's not a clang vs. GCC issue: the trigger is the (legitimate, as far as
I know) use of ctype macros in C++ header <string>.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
` (4 preceding siblings ...)
2014-11-07 8:46 ` [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14 fxcoudert at gcc dot gnu.org
@ 2014-11-09 20:35 ` howarth at bromo dot med.uc.edu
2014-11-11 9:20 ` fxcoudert at gcc dot gnu.org
2014-11-11 9:21 ` fxcoudert at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: howarth at bromo dot med.uc.edu @ 2014-11-09 20:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
--- Comment #5 from howarth at bromo dot med.uc.edu ---
Posted patch at https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00662.html.
Note that the alternate approach of modifying gcc/system.h to include <string>
conditionally on __cplusplus before "safe-ctype.h" causes bootstrap breakage
elsewhere on darwin.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
` (5 preceding siblings ...)
2014-11-09 20:35 ` howarth at bromo dot med.uc.edu
@ 2014-11-11 9:20 ` fxcoudert at gcc dot gnu.org
2014-11-11 9:21 ` fxcoudert at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-11 9:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
--- Comment #6 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Tue Nov 11 09:20:07 2014
New Revision: 217342
URL: https://gcc.gnu.org/viewcvs?rev=217342&root=gcc&view=rev
Log:
PR bootstrap/63699
PR bootstrap/63750
* system.h: Include <string> before "safe-ctype.h"
* wide-int.h (wi::smin, wi::smax, wi::umin, wi::umax): Prefix
calls to min/max with wi namespace.
* ipa-chkp.c: Don't include <string>.
* plugin.cc: Don't include <string>.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-chkp.c
trunk/gcc/system.h
trunk/gcc/wide-int.h
trunk/libcc1/ChangeLog
trunk/libcc1/plugin.cc
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
` (6 preceding siblings ...)
2014-11-11 9:20 ` fxcoudert at gcc dot gnu.org
@ 2014-11-11 9:21 ` fxcoudert at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-11 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63699
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-11 9:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 12:56 [Bug other/63699] New: bootstrap fails with Apple clang 6.0 howarth at bromo dot med.uc.edu
2014-10-31 13:30 ` [Bug other/63699] " howarth at bromo dot med.uc.edu
2014-11-05 5:47 ` andreast at gcc dot gnu.org
2014-11-07 8:42 ` fxcoudert at gcc dot gnu.org
2014-11-07 8:43 ` [Bug bootstrap/63699] " fxcoudert at gcc dot gnu.org
2014-11-07 8:46 ` [Bug bootstrap/63699] Bootstrap fails in libcc1 on darwin14 fxcoudert at gcc dot gnu.org
2014-11-09 20:35 ` howarth at bromo dot med.uc.edu
2014-11-11 9:20 ` fxcoudert at gcc dot gnu.org
2014-11-11 9:21 ` fxcoudert at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).