From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: "Aaron W. LaFramboise" <aaronavay62@aaronwl.com>,
"Ian Lance Taylor" <iant@google.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix const pointer warning in gthr-win32.h
Date: Wed, 30 Jul 2008 22:01:00 -0000 [thread overview]
Message-ID: <FEB88F0C4745488B9CEF8103F5847592@glap> (raw)
In-Reply-To: <m38wvk3fu0.fsf@google.com>
From: "Ian Lance Taylor" <iant@google.com>
> "Aaron W. LaFramboise" <aaronavay62@aaronwl.com> writes:
>
>> OK, I discovered this file is also used in other places outside of GCC
>> such as in libgfortran, so using tsystem.h is not OK there. What is
>> the proper way to make this error go away then, as I understand the
>> union trick is the only way to silence it?
Is it possible to fix (i.e. const-ify) the relevant function prototypes, or
do you end up calling a system interface that's non-const and get stuck?
>> By the way, I think this prototype is actually incorrect. The ptr
>> parameter really should not be const, because __gthread_getspecific
>> returns a non-const void *. However, I'm not sure if there's some
>> other reason this should be const; does anyone know about this?
>
> What code are you compiling when you see this warning? As far as I
> know code that uses gthr-win32.h is mostly C code which should be
> compiled with -Wc++-compat.
> Ian
I think the warning comes from -Wcast-qual, not -Wc++-compat.
--Kaveh
next prev parent reply other threads:[~2008-07-30 18:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 2:01 Aaron W. LaFramboise
2008-07-11 4:29 ` Kaveh R. GHAZI
2008-07-28 23:33 ` Aaron W. LaFramboise
2008-07-29 17:21 ` Ian Lance Taylor
2008-07-30 22:01 ` Kaveh R. Ghazi [this message]
2008-07-31 4:08 ` Aaron W. LaFramboise
2008-08-23 18:32 ` [PATCH] Make the pointer parameter to __gthread_setspecific non-const Aaron W. LaFramboise
2008-08-23 18:48 ` Richard Guenther
2008-08-23 19:42 ` Aaron W. LaFramboise
2008-08-23 19:53 ` Richard Guenther
2008-08-23 21:22 ` Aaron W. LaFramboise
2008-08-23 21:31 ` Richard Guenther
2008-08-23 22:12 ` Aaron W. LaFramboise
2008-08-24 0:24 ` Richard Guenther
2008-08-24 4:23 ` Aaron W. LaFramboise
2008-08-24 10:33 ` Richard Guenther
2008-08-25 7:55 ` Danny Smith
2008-09-03 8:31 ` Danny Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FEB88F0C4745488B9CEF8103F5847592@glap \
--to=ghazi@caip.rutgers.edu \
--cc=aaronavay62@aaronwl.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).