lkml.org 
[lkml]   [2016]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/fork.c: use sizeof() instead of sizeof
On Tue, Feb 02, 2016 at 05:04:06PM +0000, Al Viro wrote:

> FWIW, the actual rules are
> unary-expression: postfix-expression |
> ++ unary-expression |
> -- unary-expression |
> - cast-expression |
> + cast-expression |
> ! cast-expression |
> ~ cast-expression |
> * cast-expression |
> & cast-expression |
> sizeof unary-expression |
> sizeof ( type-name )
> cast-expression: unary-expression |
> ( type-name ) cast-expression
> Note that while e.g.
> ++ ++ n
> is allowed by grammar, it runs afoul of the constraint for ++ argument, which
> must be a modifiable lvalue. None of the operators above yield that, so
> the rules for ++ and -- might as well have been ++ postfix-expression and
> -- postfix-expression resp.

Unless I'm mistaken, * cast-expression yields an lvalue.

- Kevin

\
 
 \ /
  Last update: 2016-02-03 05:21    [W:0.123 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site