Bug#475839: libc6-dev: pthread_mutex_t definition contains a nameless union
On Sat, 10 May 2008, Aurelien Jarno wrote:
> tag 475839 + wontfix
> thanks
[...]
> > Here is a test program:
> > --- pthread_mutex_t.c ---
> > #include <pthread.h>
> > pthread_mutex_t mutex;
> > --- pthread_mutex_t.c ---
> >
> > Compiling it with gcc 2.95 gives the following error:
> > $ gcc-2.95 -c pthread_mutex_t.c
> > In file included from /usr/include/pthread.h:30,
> > from pthread_mutex_t.c:1:
> > /usr/include/bits/pthreadtypes.h:99: warning: unnamed struct/union that defines no instances
>
> gcc-2.95 does not give an error, but outputs a simple warning.
>
> I don't think it worth supporting an old compiler that is not present
> in lenny. Tagging the bug as wontfix.
I would like this bug to be reopened because I think it was closed for
the wrong reasons:
1) gcc-2.95 is still present in Lenny. If you are not seeing it in
aptitude, it's because you are using the 64bit build.
2) It's very easy to get a compilation error. Just try to compile the
following program:
--- pthread_mutex_t.c ---
#include <pthread.h>
pthread_mutex_t mutex=PTHREAD_MUTEX_INITIALIZER;
--- pthread_mutex_t.c ---
3) This particular construct also seems to be causing trouble with PCC:
http://pcc.ludd.ltu.se/jira/browse/PCC-5
4) Wine contains code very similar to the above and thus fails to
compile with gcc-2.95. This is actually the whole reason why I
compile it with gcc 2.95: to ensure that Wine's code does not
contain such non-portable constructs. But having the compilation
fail due to the C library headers, or having to patch said headers
on a regular basis, is annoying.
--
Francois Gouget <fgouget@free.fr> http://fgouget.free.fr/
We are Pentium of Borg. You will be approximated. Division is futile.
Reply to: