Hello Jarrett,
On Wed, Aug 26, 2009 at 8:47 PM, Stewart Gordon<[email protected]>
wrote:
qwert * yuiop;
a declaration of yuiop as a pointer to a qwert, or an instruction to
multiply qwert by yuiop but do nothing with the result?
It's grammatically ambiguous, but not semantically. No-op statements
are illegal. Thus, it's perfectly fine to always parse this as a
pointer decl, since the other possible parse tree is always
semantically invalid.
In C, not in C++ or D where operator overloading can come into effect.
also consider:
A*B=C;
where A*B might be an expression that defines assignment. (BTW gcc assumes
A is a type and errors)