------- 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" <[EMAIL PROTECTED]> 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

Reply via email to