This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fixincl.c fails to compile for h8300 target


Hi,

When compiling gcc for h8300-hms as the target, it fails to compile at
fixinc/fixincl.c with the following error message.

../../../gcc/gcc/fixinc/fixincl.x:5809: initializer element for `gnu_type_map[1].pz_gtype' is not constant
../../../gcc/gcc/fixinc/fixincl.x:5810: initializer element for `gnu_type_map[2].pz_gtype' is not constant

The problem seems to come from the fact that h8300.h has the following.

/* ANSI C types.
   We use longs for the 300h because ints can be 16 or 32.
   GCC requires SIZE_TYPE to be the same size as pointers.  */
#define NO_BUILTIN_SIZE_TYPE
#define NO_BUILTIN_PTRDIFF_TYPE
#define SIZE_TYPE (TARGET_H8300 ? "unsigned int" : "long unsigned int")
#define PTRDIFF_TYPE (TARGET_H8300 ? "int" : "long int")

#define WCHAR_TYPE "short unsigned int"
#define WCHAR_TYPE_SIZE 16
#define MAX_WCHAR_TYPE_SIZE 16

Here SIZE_TYPE and PTRDIFF_TYPE depend on which H8/300 variant the
user chooses. Thus they are not constants. (WCHAR_TYPE is OK because
it is constant.) Well, this is as far as I have looked into. Could
anyone help here?

Thanks,

Kazu Hirata


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]