GCC compiling issues

Ian Lance Taylor iant@google.com
Tue May 26 20:31:00 GMT 2009


"Michael J. Beer" <mibeer@uni-osnabrueck.de> writes:

> Then compilation was started by
> make bootstrap
>
> What I get is
> gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
> -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -fno-common
> -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.4.0/gcc -I../../gcc-4.4.0/gcc/.
> -I../../gcc-4.4.0/gcc/../include -I../../gcc-4.4.0/gcc/../libcpp/include
> -I/home/mibeer/prog/include -I/home/mibeer/prog/include
> -I../../gcc-4.4.0/gcc/../libdecnumber
> -I../../gcc-4.4.0/gcc/../libdecnumber/bid -I../libdecnumber
> ../../gcc-4.4.0/gcc/c-lang.c -o c-lang.o
> In file included from ../../gcc-4.4.0/gcc/input.h:25,
>>From ../../gcc-4.4.0/gcc/tree.h:27,
>>From ../../gcc-4.4.0/gcc/c-lang.c:27:
> ../../gcc-4.4.0/gcc/../libcpp/include/line-map.h:67: Fehler: »CHAR_BIT«
> ist hier nicht deklariert (nicht in einer Funktion)
>
> I found out, that compilation just continues if I change line 61 in
> gcc-4.4.0//libcpp/include/line-map.h from:
> struct line_map GTY(())
> to:
> struct line_map GTY()

That change is not correct and to be honest I don't understand why it
would make any difference.

The problem appears to be this line:
  ENUM_BITFIELD (lc_reason) reason : CHAR_BIT;
The error appears to be that CHAR_BIT is not defined.  CHAR_BIT is
normally defined by <limits.h>.  You didn't mention which system you are
using.  Check whether /usr/include/limits.h defines CHAR_BIT.

You can probably work around this issue by adding something like this
near the start of line-map.h:

#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif

Ian



More information about the Gcc-help mailing list