gcc 4.5.0 stddef.h clobbers __size_t with #define, breaks VMS (code already avoids similar on FreeBSD)
Tristan Gingold
gingold@adacore.com
Mon May 3 10:44:00 GMT 2010
On May 3, 2010, at 12:33 PM, Jay K wrote:
>
> VMS decc$types.h:
>
> typedef unsigned int __size_t;
>
> but with GCC 4.5.0 this preprocesses as:
>
> typedef unsigned int ;
>
> and there are ensuing errors e.g. when compiling gcc/libiberty/regex.c
>
> probably because of:
>
> /usr/local/lib/gcc/alpha-dec-vms/4_5_0/include/stddef.h (it does get included)
> #if defined (__FreeBSD__) && (__FreeBSD__>= 5)
> /* __size_t is a typedef on FreeBSD 5!, must not trash it. */
> #else
> #define __size_t
> #endif
>
> presumably should be more like:
>
> #if (defined (__FreeBSD__) && (__FreeBSD__>= 5)) || defined(__vms)
> /* __size_t is a typedef on FreeBSD 5 and VMS, must not trash it! */
> #else
> #define __size_t
> #endif
Hi,
yes, I think this is necessary on VMS. Could you submit formally a patch (I can't approve it, but it is
a required first step).
> That gets further, then hits
>
>
> src/gcc-4.5.0/libiberty/regex.c: In function 'byte_insert_op2':
> /src/gcc-4.5.0/libiberty/regex.c:4279:1: error: unrecognizable insn:
> (insn 62 61 63 5 /src/gcc-4.5.0/libiberty/regex.c:4276 (set (reg:DI 135)
> (plus:SI (subreg/s:SI (reg/v/f:DI 109 [ pfrom ]) 0)
> (const_int 5 [0x5]))) -1 (nil))
> /src/gcc-4.5.0/libiberty/regex.c:4279:1: internal compiler error: in extract_insn, at recog.c:2103
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> make: *** [regex.o] Error 1
I suppose you have hit a 32/64 pointer issue. This requires some investigation! We plan to fix them,
but we haven't yet started this work on gcc 4.5
Tristan.
More information about the Gcc
mailing list