From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2264 invoked by alias); 2 Jul 2005 22:39:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2249 invoked by alias); 2 Jul 2005 22:39:44 -0000 Date: Sat, 02 Jul 2005 22:39:00 -0000 Message-ID: <20050702223944.2248.qmail@sourceware.org> From: "gdr at integrable-solutions dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050702164323.22278.olivier.baudron@m4x.org> References: <20050702164323.22278.olivier.baudron@m4x.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/22278] gcc -O2 discards cast to volatile X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg00224.txt.bz2 List-Id: ------- Additional Comments From gdr at integrable-solutions dot net 2005-07-02 22:39 ------- Subject: Re: gcc -O2 discards cast to volatile "pinskia at gcc dot gnu dot org" writes: | (In reply to comment #13) | > | > It is also wrong-code. | | This is the opposite view of what JSM said on IRC. Sorry, I do not follow IRC, and it would be unfortunate that PRs get closed based on claims we do not have logs for so that users and people can look at them and scrutinize. Furthermore, the fundamental issue is whether this *(volatile int*) (int*) (&foo); (or equivalent) where foo has been defined volatile int should be treated differently from *(volatile int*) (&foo); or foo; For all useful purposes, it helps remembering that GCC is not an academic exercise in C standard reading. | Take it up with him if you believe otherwise. | Basically this is all implemention defined and since we did not | document before, we have a chance to define it to what we want. and it is hard to believe we (GCC developers aiming at useful compiler, as opposed to students doing academic exercise) will define it to be either contradictory or the most useless as possible. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22278