Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #151257

Re: direct-declarator or direct-abstract-declarator?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: direct-declarator or direct-abstract-declarator?
Date Thu, 09 Apr 2020 06:52:08 -0700
Organization A noiseless patient Spider
Lines 30
Message-ID <86h7xsn4vr.fsf@linuxsc.com> (permalink)
References <r6n2lg$tlg$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info reader02.eternal-september.org; posting-host="bedbb4a28902cd1137b240ce253aab81"; logging-data="15246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qHs1Y62Yffi1P2kaNF70UxPt5DauESEc="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:A4Ro2tXLehA3nXV9Hwi47OfPvbY= sha1:lh6viLfl0yhbmfBarbR/G/4aOpI=
Xref csiph.com comp.lang.c:151257

Show key headers only | View raw


Johann Klammer <klammerj@NOSPAM.a1.net> writes:

> [considering this code, excerpted from n2176, page 100:]
>
>    typedef signed int t;
>    t f(t (t));
>
> [About the declaration of f it is said:]

> a function f is declared with type
> "function returning signed int
>     with one unnamed parameter
>     with type pointer to function returning signed int
>         with one unnamed parameter with type signed int"
>
> [...]
>
> So how do I get to the typedef name 't' there towards the end
> with the grammar specified?


  t  f( t                                    ( t                      )  );
          ^                                 ^  ^                     ^ ^
          + direct-abstract-declarator{opt} +  + parameter-type-list + |
          |                                                            |
          |                                                            |
          +-------------  direct-abstract-declarator  -----------------+


Does this help clarify things?

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

direct-declarator or direct-abstract-declarator? Johann Klammer <klammerj@NOSPAM.a1.net> - 2020-04-09 13:58 +0200
  Re: direct-declarator or direct-abstract-declarator? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-04-09 06:52 -0700
  Re: direct-declarator or direct-abstract-declarator? James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-09 11:23 -0400
    Re: direct-declarator or direct-abstract-declarator? Johann Klammer <klammerj@NOSPAM.a1.net> - 2020-04-09 19:20 +0200

csiph-web