public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/53888] New: gthr-win32.h defines __gthread_mutex_destroy with wrong return type
@ 2012-07-07 18:26 redi at gcc dot gnu.org
2012-07-07 18:40 ` [Bug target/53888] " redi at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2012-07-07 18:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53888
Bug #: 53888
Summary: gthr-win32.h defines __gthread_mutex_destroy with
wrong return type
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: redi@gcc.gnu.org
Target: *-mingw32
gthr.h documents the required function
int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
but gthr-win32.h defines:
static inline void
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{
__gthr_win32_mutex_destroy (__mutex);
}
This means code using __gthread_mutex_destroy can't check the return value, as
it would fail to compile on Windows.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/53888] gthr-win32.h defines __gthread_mutex_destroy with wrong return type
2012-07-07 18:26 [Bug target/53888] New: gthr-win32.h defines __gthread_mutex_destroy with wrong return type redi at gcc dot gnu.org
@ 2012-07-07 18:40 ` redi at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2012-07-07 18:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53888
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-07 18:39:45 UTC ---
Untested patch
diff --git a/libgcc/config/i386/gthr-win32.h b/libgcc/config/i386/gthr-win32.h
index 53f8396..f2dded2 100644
--- a/libgcc/config/i386/gthr-win32.h
+++ b/libgcc/config/i386/gthr-win32.h
@@ -474,6 +474,7 @@ static inline void
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{
__gthr_win32_mutex_destroy (__mutex);
+ return 0;
}
static inline int
@@ -635,6 +636,7 @@ static inline void
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{
CloseHandle ((HANDLE) __mutex->sema);
+ return 0;
}
static inline int
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-07 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-07 18:26 [Bug target/53888] New: gthr-win32.h defines __gthread_mutex_destroy with wrong return type redi at gcc dot gnu.org
2012-07-07 18:40 ` [Bug target/53888] " redi at gcc dot gnu.org
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).