public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/2764: Fixinclude should fix PTHREAD_MUTEX_INITIALIZER on Solaris2.7
@ 2001-07-31 13:06 ljrittle
0 siblings, 0 replies; 2+ messages in thread
From: ljrittle @ 2001-07-31 13:06 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, wolfgang.bangerth
Synopsis: Fixinclude should fix PTHREAD_MUTEX_INITIALIZER on Solaris2.7
State-Changed-From-To: open->closed
State-Changed-By: ljrittle
State-Changed-When: Tue Jul 31 13:06:05 2001
State-Changed-Why:
Closed at Bruce Korb's request (he patched it).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2764&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* other/2764: Fixinclude should fix PTHREAD_MUTEX_INITIALIZER on Solaris2.7
@ 2001-05-07 10:56 wolfgang.bangerth
0 siblings, 0 replies; 2+ messages in thread
From: wolfgang.bangerth @ 2001-05-07 10:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 2764
>Category: other
>Synopsis: Fixinclude should fix PTHREAD_MUTEX_INITIALIZER on Solaris2.7
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 07 10:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
sparc-sun-solaris2.7, gcc version 3.0 20010507 (prerelease)
>Description:
In the definition of PTHREAD_MUTEX_INITIALIZER in
/usr/include/pthread.h some elements of the
pthread_mutex_t structure are not initialized, leading
to warnings with -ansi -Wall:
>How-To-Repeat:
>Fix:
fixincludes should change the definition of PTHREAD_MUTEX_INITIALIZER
in /usr/include/pthread.h, line 63, from
#define PTHREAD_MUTEX_INITIALIZER {{{0}, 0}, {{{0}}}, 0}
to something that matches the declaration of the pthread_mutex_t
structure better:
typedef struct _pthread_mutex {
struct {
uint8_t __pthread_mutex_flag[4];
uint32_t __pthread_mutex_type;
} __pthread_mutex_flags;
union {
struct {
uint8_t __pthread_mutex_pad[8];
} __pthread_mutex_lock64;
upad64_t __pthread_mutex_owner64;
} __pthread_mutex_lock;
upad64_t __pthread_mutex_data;
} pthread_mutex_t;
(Sorry, I am not enough a C hacker to know how to initialize
the union properly :-)
Regards
Wolfgang
>Release-Note:
>Audit-Trail:
>Unformatted:
>>>> c++ -ansi -Wall -o /dev/null -c a.cc
a.cc:2: warning: aggregate has a partly bracketed initializer
>>>> cat a.cc
#include <pthread.h>
pthread_mutex_t t = PTHREAD_MUTEX_INITIALIZER;
The same error also occured with gcc2.95. However, the new
libstdc++ includes this file in some place, so more people
will probably see this problem with gcc3 than with previous
gcc versions.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-31 13:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-31 13:06 other/2764: Fixinclude should fix PTHREAD_MUTEX_INITIALIZER on Solaris2.7 ljrittle
-- strict thread matches above, loose matches on Subject: below --
2001-05-07 10:56 wolfgang.bangerth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).