Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Tue, 6 Sep 2016 09:30:32 -0700

On Sun, Sep 4, 2016 at 11:35 PM, Anselm R Garbe <garbeam_AT_gmail.com> wrote:
> See http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf 6.5.3
> for unary operator specification of the C language.

6.5.3 shows (the relevant parts)
unary-expression:
    postfix-expression
    ....
    sizeof unary-expression
    sizeof ( type-name )

6.5.2:
postfix-expression:
    primary-expression
    ....

6.5.1:
primary-expression:
    ....
    ( expression )

As a result the parens are required for types, and acceptable for variables.
Received on Tue Sep 06 2016 - 18:30:32 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 06 2016 - 18:36:15 CEST