Bug#317494: libc6-dev: illegal syntax in obstack.h
Package: libc6-dev
Version: 2.3.2.ds1-22
Severity: normal
Tags: sid, upstream
The following definitions cause errors when compiled with gcc-4.0:
obstack_ptr_grow
obstack_int_grow
obstack_ptr_grow_fast
obstack_int_grow_fast
The problem is that they each contain a statement of the form
*((foo *) bar->next_free)++ = baz;
which is not legal C code, because the ++ operator uses the preceding
cast expression as an lvalue, but cast expressions _aren't_ lvalues.
One way of dealing with this is to rewrite each instance as
*((foo *) bar->next_free) = baz;
bar->next_free += (sizeof (foo));
which works because the next_free field is a "char *".
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (1200, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.2-cph2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages libc6-dev depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii linux-kernel-headers 2.6.12.0-1 Linux Kernel Headers for developme
Versions of packages libc6-dev recommends:
ii gcc [c-compiler] 4:4.0.0-2 The GNU C compiler
ii gcc-2.95 [c-compiler] 1:2.95.4-22 The GNU C compiler
ii gcc-3.3 [c-compiler] 1:3.3.6-7 The GNU C compiler
ii gcc-3.4 [c-compiler] 3.4.4-5 The GNU C compiler
ii gcc-4.0 [c-compiler] 4.0.0-12 The GNU C compiler
-- no debconf information
Reply to: