Message ID | 1399105469.2451.31.camel@yam-132-YW-E178-FTW |
---|---|
State | New |
Headers | show |
On Sat, 3 May 2014, Oleg Endo wrote: > +#include <sstream> > +#include <vector> > +#include <algorithm> > + > #include "config.h" It's never OK to include any system headers (C or C++) before "config.h". config.h may define feature test macros such as _FILE_OFFSET_BITS that affect system headers in various ways and are only effective if defined before any system headers are included, and if different files in GCC are built with different settings of such feature test macros then they may expect incompatible choices of ABI for C library types. (This is a general principle for any software using autoconf, at least if it uses any of the autoconf macros that can define feature test macros - which GCC does - not just for GCC.)
Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 210027) +++ gcc/config/sh/sh.c (working copy) @@ -19,6 +19,10 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#include <sstream> +#include <vector> +#include <algorithm> + #include "config.h" #include "system.h" #include "coretypes.h" @@ -70,10 +74,6 @@ #include "pass_manager.h" #include "context.h" -#include <sstream> -#include <vector> -#include <algorithm> - int code_for_indirect_jump_scratch = CODE_FOR_indirect_jump_scratch; /* These are some macros to abstract register modes. */