🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3680

Re: Parenthesis with return ?

#3680
From: Clive D.W. Feather
Date: Tue, 08 Aug 1995 05:11
24 lines
1337 bytes
In article <DCy9uG.CEr@proteon.com>, John Woods <jfw@proteon.com> wrote:
> It's kind of like sizeof operator, where in 99% of all programs, you'll
> see sizeof expression written as sizeof(expression), even though those
> parentheses aren't required either[*]; note that when you see
> ``sizeof( int )'', what you are really looking at is ``sizeof CAST'',
> not ``sizeof( TYPE )''.

This last bit is nonsense: the syntax is:

    unary-expression:
        postfix-expression
        ++ unary-expression
        -- unary-expression
        unary-operator cast-expression
        sizeof unary-expression
        sizeof ( type-name )

In other words, the argument to sizeof is either "unary-expression" or
"( type-name )".

-- 
Clive D.W. Feather                       | If you lie to the compiler,
clive@demon.net        (work, preferred) | it will get its revenge.
clive@stdc.demon.co.uk (home)            |   - Henry Spencer
Technical Details
Message-ID: <DCz7qw.HvM@stdc.demon.co.uk>
Path: arc1-ca.pugleaf.net!stdc.demon.co.uk!clive
References: <405fhs$iin@boson.epita.fr> <DCy9uG.CEr@proteon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!stdc.demon.co.uk!clive
From: clive@stdc.demon.co.uk (Clive D.W. Feather)
Newsgroups: comp.std.c
Subject: Re: Parenthesis with return ?
Date: Tue, 8 Aug 1995 05:11:18 GMT
Organization: Demon Internet Limited (personal account)
Message-ID: <DCz7qw.HvM@stdc.demon.co.uk>
References: <405fhs$iin@boson.epita.fr> <DCy9uG.CEr@proteon.com>
X-NNTP-Posting-Host: stdc.demon.co.uk