This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]