This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: volatile semantics
| From: Daniel Berlin <dberlin@dberlin.org>
| On Sat, 2005-07-16 at 21:36 -0400, D. Hugh Redelmeier wrote:
| > | From: Gabriel Dos Reis <gdr@integrable-solutions.net>
| >
| > | After many exchanges via private mails and
| > | looking at the various reports related to this issue, it has become
| > | clear to me that the interpretations offered to justify why GCC is
| > | behaving the way it does seem to go beyond what can be inferred.
| >
| > OK.
| >
| > Is there a consensus on this? If not, how can a consensus be reached?
| >
| I'll pass on this, since I've said my piece, and i don't care about
| volatile much.
I would very much like you to restate your objections with careful
reference to the C Standard. I really want the correct analysis more
than I want my analysis.
| However, if you come after const or restrict I'll bite
| back.
What exactly do you think const says that you can find useful for
optimization? I don't think that it is helpful (except on actual
definitions). But I haven't looked closely at this issue.
| Personally, I think a DR should be filed to clarify this, instead of all
| this argument and opinion.
I would like you to explain where you think that the current standard
is ambiguous on this matter. Without ambiguity or error, a DR is not
appropriate.
| > If so, how can we get a fix?
| Usually by asking nicely and pressuring people.
| Or waiting long enough for someone to get around to it.
| Or paying someone to fix it :)
Those are good answers.
| > I think that is urgent.
| No offense, but everyone thinks the problems that affect them are the
| most urgent.
Yeah. I've given a few arguments for urgency.
| > This bug is causing X to misbehave and the
| > current workarounds might be harmful. Who knows what other
| > manifestations might be lurking?
|
| Whoever is testing distributions compiled with mainline :)
Testing can show the presence of bugs but not their absence. But you
knew that.
| > As I said, I'm not a GCC hacker. Who is the likely maintainer to fix
| > this?
| Anyone can fix it, however, who can review the fix depends on what it
| touches.
|
| > Does he or she agree that this needs to be done?
| > Urgently?
|
| This is actually probably pretty unlikely. There are few bugs most
| people consider urgent, and i'd venture this is not one of them. It
| would probably be fixed by release time.
|
| In that spirit, here is a patch against mainline that fixes your bug (a
| similar patch to the same function should work on 4.0)
Thanks!
| Someone else can go through the process of testing and getting this
| reviewed, i'm currently swamped (IE i have no plans to try to submit
| this to gcc-patches).