Bug#509571: gcc-4.3: stddef.h sometimes does not define ptrdiff_t
Package: gcc-4.3
Version: 4.3.2-1
Severity: important
File: /usr/lib/gcc/i486-linux-gnu/4.3/include/stddef.h
When certain combinations of headers precede <stddef.h>, ptrdiff_t
does not get defined. The particular sequence that triggered it for
me was <wchar.h>, <wctype.h>, <stddef.h> but that might not be the
only one.
$ cat tmp1.c
#include <wchar.h>
#include <wctype.h>
#include <stddef.h>
ptrdiff_t x = 1;
$ gcc -c tmp1.c
tmp1.c:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'x'
The problem doesn't happen if <wchar.h> and <wctype.h> are the other way
round.
$ cat tmp2.c
#include <wctype.h>
#include <wchar.h>
#include <stddef.h>
ptrdiff_t x = 1;
$ gcc -c tmp2.c
$
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.3 depends on:
ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii cpp-4.3 4.3.2-1 The GNU C preprocessor
ii gcc-4.3-base 4.3.2-1 The GNU Compiler Collection (base
ii libc6 2.7-16 GNU C Library: Shared libraries
ii libgcc1 1:4.3.2-1 GCC support library
ii libgomp1 4.3.2-1 GCC OpenMP (GOMP) support library
Versions of packages gcc-4.3 recommends:
ii libc6-dev 2.7-16 GNU C Library: Development Librari
Versions of packages gcc-4.3 suggests:
pn gcc-4.3-doc <none> (no description available)
pn gcc-4.3-locales <none> (no description available)
pn gcc-4.3-multilib <none> (no description available)
pn libgcc1-dbg <none> (no description available)
pn libgomp1-dbg <none> (no description available)
pn libmudflap0-4.3-dev <none> (no description available)
pn libmudflap0-dbg <none> (no description available)
-- no debconf information
Reply to: