N
Netocrat
If you'd been along for the ride on this thread from the beginning you
wouldn't doubt it.
Whereas in the pedantry this thread has caused me to adopt I have
attempted an exhaustive search, the results of which are posted in my
reply to Keith's response.
Right, because whilst C99 arguably defines it as an lvalue (as I noted
in my response to Keith it's possible - but IMO not preferable - to
argue that whether or not such an expression is an lvalue is
unspecified), it certainly doesn't define it as an object, and it
violates a constraint (again, we've covered this ground already in this
thread):
6.5.3.2 Address and indirection operators
Constraints
#1
The operand of the unary & operator shall be either a function
designator, the result of a [] or unary * operator, or an lvalue that
designates an object that is not a bit- field and is not declared with
the register storage-class specifier.
wouldn't doubt it.
I'm pretty sure this list isn't complete; I haven't
attempted to do any kind of exhaustive search.
Whereas in the pedantry this thread has caused me to adopt I have
attempted an exhaustive search, the results of which are posted in my
reply to Keith's response.
Actually I think the expression '&(a+b)' is nonsense no matter
what the types of a and b are.
Consider this expression:
sizeof &(a+b)
Assuming no variable length arrays, there is no evaluation of
the address operator; however, the expression is still
illegal:
Right, because whilst C99 arguably defines it as an lvalue (as I noted
in my response to Keith it's possible - but IMO not preferable - to
argue that whether or not such an expression is an lvalue is
unspecified), it certainly doesn't define it as an object, and it
violates a constraint (again, we've covered this ground already in this
thread):
6.5.3.2 Address and indirection operators
Constraints
#1
The operand of the unary & operator shall be either a function
designator, the result of a [] or unary * operator, or an lvalue that
designates an object that is not a bit- field and is not declared with
the register storage-class specifier.