diff -rc gcc-3.1/gcc/config/h8300/h8300.h gcc-3.1.new/gcc/config/h8300/h8300.h *** gcc-3.1/gcc/config/h8300/h8300.h Tue Feb 19 16:36:55 2002 --- gcc-3.1.new/gcc/config/h8300/h8300.h Tue May 21 10:55:39 2002 *************** *** 38,46 **** extern const char * const *h8_reg_names; /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES \ "-D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L" #define CPP_SPEC \ "%{!mh:%{!ms:-D__H8300__}} %{mh:-D__H8300H__} %{ms:-D__H8300S__} \ --- 38,49 ---- extern const char * const *h8_reg_names; /* Names to predefine in the preprocessor for this target machine. */ ! /* #define CPP_PREDEFINES \ "-D__LONG_MAX__=2147483647L -D__LONG_LONG_MAX__=2147483647L" + */ + #define CPP_PREDEFINES \ + "-D__LONG_MAX__=2147483647L" #define CPP_SPEC \ "%{!mh:%{!ms:-D__H8300__}} %{mh:-D__H8300H__} %{ms:-D__H8300S__} \ *************** *** 51,56 **** --- 54,60 ---- %{mh:-Acpu=h8300h -Amachine=h8300h} \ %{ms:-Acpu=h8300s -Amachine=h8300s} \ %{!mint32:-D__INT_MAX__=32767} %{mint32:-D__INT_MAX__=2147483647} \ + %{!mint32:-D__LONG_LONG_MAX__=2147483647L} %{mint32:-D__LONG_LONG_MAX__=9223372036854775807LL} \ %(subtarget_cpp_spec)" #define SUBTARGET_CPP_SPEC "" *************** *** 220,226 **** #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16) #define LONG_TYPE_SIZE 32 ! #define LONG_LONG_TYPE_SIZE 32 #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 32 #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE --- 224,230 ---- #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16) #define LONG_TYPE_SIZE 32 ! #define LONG_LONG_TYPE_SIZE (TARGET_INT32 ? 64 : 32) #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 32 #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE *************** *** 1364,1367 **** --- 1368,1381 ---- #define MOVE_RATIO 3 + #ifdef IN_LIBGCC2 + #undef LONG_LONG_TYPE_SIZE + #if __INTMAX__ == 32767 + #define DI SI + #define LONG_LONG_TYPE_SIZE 32 + #else + #define LONG_LONG_TYPE_SIZE 64 + #endif + #endif + #endif /* ! GCC_H8300_H */ diff -rc gcc-3.1/gcc/config/h8300/t-h8300 gcc-3.1.new/gcc/config/h8300/t-h8300 *** gcc-3.1/gcc/config/h8300/t-h8300 Fri Aug 31 02:51:04 2001 --- gcc-3.1.new/gcc/config/h8300/t-h8300 Tue May 21 10:56:30 2002 *************** *** 8,14 **** LIB2FUNCS_EXTRA = $(srcdir)/config/h8300/fixunssfsi.c # We do not have DF or DI types, so fake out the libgcc2 compilation. ! TARGET_LIBGCC2_CFLAGS = -DDF=SF -DDI=SI # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. --- 8,15 ---- LIB2FUNCS_EXTRA = $(srcdir)/config/h8300/fixunssfsi.c # We do not have DF or DI types, so fake out the libgcc2 compilation. ! #TARGET_LIBGCC2_CFLAGS = -DDF=SF -DDI=SI ! TARGET_LIBGCC2_CFLAGS = -DDF=SF # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. diff -rc gcc-3.1/gcc/cp/decl.c gcc-3.1.new/gcc/cp/decl.c *** gcc-3.1/gcc/cp/decl.c Sat May 4 03:55:23 2002 --- gcc-3.1.new/gcc/cp/decl.c Tue May 21 10:55:39 2002 *************** *** 3500,3506 **** except for any that we copy here from the old type. */ DECL_ATTRIBUTES (newdecl) = (*targetm.merge_decl_attributes) (olddecl, newdecl); ! decl_attributes (&newdecl, DECL_ATTRIBUTES (newdecl), 0); if (TREE_CODE (newdecl) == TEMPLATE_DECL) { --- 3500,3506 ---- except for any that we copy here from the old type. */ DECL_ATTRIBUTES (newdecl) = (*targetm.merge_decl_attributes) (olddecl, newdecl); ! /*decl_attributes (&newdecl, DECL_ATTRIBUTES (newdecl), 0);*/ if (TREE_CODE (newdecl) == TEMPLATE_DECL) {