From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | 26 Sep 2006 01:04:41 -0400 |
Organization: | Compilers Central |
References: | 06-09-02906-09-042 06-09-048 06-09-060 06-09-078 06-09-093 06-09-108 06-09-117 06-09-125 06-09-137 |
Keywords: | parse, C, comment |
Posted-Date: | 26 Sep 2006 01:04:41 EDT |
Chris Dollin wrote:
>>C99 states that type declarations are not allowed in C procedure
>>definitions.
>
>
> Interesting. The draft has no such restriction in the typedef section,
> and an explicit example with a typedef inside a function. Could you
> provide a cite for me?
Just from the DRAFT: 2 December 1996:
>>
7.1.3 ... [dcl.typedef]
1. ... The typedef specifier shall not be used in a function-definition
(8.4),
<<
Can somebody lookup this paragraph in the final spec?
(The numbers have changed!)
DoDi
[I can't find that language, but there is a lengthy footnote on page
141 with examples that specifically say that you can typedef a
function type and use it in declarations but not in
definitions. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.