g++-2.95 rejects cast to void

Alexandre Oliva oliva@dcc.unicamp.br
Thu Jun 17 04:21:00 GMT 1999


On Jun 17, 1999, Nathan Sidwell <nathan@acm.org> wrote:

> a patch will be forthcoming.

Great, thanks!

> This line of reasoning implies that g++.bugs/900428_01.C is wrong,
> even for volatile objects in statement expressions (6.2/1), because
> lvalue->rvalue never happens.

Yup

> though we probably want to warn about such volatile accesses.

What's the point?  I'd agree with warning about volatile accesses of
built-in types, such as `*(int*)foo', since they'd just be optimized
away (would they?), but it doesn't make sense to access a volatile
struct as a whole, does it?

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



More information about the Gcc-bugs mailing list