From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: "Joern Rennecke" <joernr@arc.com>, "Ian Lance Taylor" <iant@google.com>
Cc: <gcc@gcc.gnu.org>
Subject: Re: constified note_stores
Date: Mon, 09 Jun 2008 23:45:00 -0000 [thread overview]
Message-ID: <13D82723C9864E9C93CA351786EAE74C@glap> (raw)
In-Reply-To: <m33anmkx85.fsf@google.com>
From: "Ian Lance Taylor" <iant@google.com>
> Joern Rennecke <joernr@arc.com> writes:
>
>> I have been using note_stores to modify selected assignments. Now when I
>> try to move this code to gcc 4.4, I find that I get a warning because
>> my walker function takes a non-const rtx - and if I make it take a const
>> rtx,
>> there will be a warning somewhere inside because there is a code path
>> where a SET_SRC is modified.
>> data is in use to point to a libiberty hash table.
>>
>> So, am I supposed to ignore the warning?
>> Roll my own copy of the original note_stores?
>> Resurrect the original note_stores in rtlanal.c (by whatever name)?
>
> Use CONST_CAST_RTX where necessary.
> Ian
Or pass in a struct pointer to the "data" parameter containing both your
hash table and the rtx to be modified. Pull out either member in the walker
function as necessary.
Me, I prefer being const-correct, but I understand not everyone shares my
enthusiasm for it. :-/
--Kaveh
--
Kaveh R. Ghazi
next prev parent reply other threads:[~2008-06-09 23:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-09 22:43 Joern Rennecke
2008-06-09 23:28 ` Ian Lance Taylor
2008-06-09 23:45 ` Kaveh R. Ghazi [this message]
2008-06-10 13:39 ` Joern Rennecke
2008-06-10 14:47 ` Ian Lance Taylor
2008-06-10 17:44 ` Kaveh R. GHAZI
2008-06-10 18:22 ` Joern Rennecke
2008-06-10 18:28 ` Steven Bosscher
2008-06-10 18:58 ` Joern Rennecke
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=13D82723C9864E9C93CA351786EAE74C@glap \
--to=ghazi@caip.rutgers.edu \
--cc=gcc@gcc.gnu.org \
--cc=iant@google.com \
--cc=joernr@arc.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).