This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [gimple] assignments to volatile
> What about
> (void) vobj;
> or
> (void) (vobj = data);
> ? Should that read vobj?
Yes on the first. Don't know on the second. The problem is that some
programmers have a bad habit of throwing in (void) when it isn't needed,
for example when ignoring the return value of a function used as a
statement. Code like (void) printf (...) is quite common. Given that
people do this, it's hard to guess what (void) (a=b); was intended to
convey. Maybe the best thing to do with that one is (a) pick an answer,
(b) generate a warning.
paul