3.3.1: The point of declaration for a name is immediately after its complete
declarator (clause 8) and before its initializer (if any)

3.3.2: The potential scope of a function parameter name ... begins at its point
of declaration.

So this ought to be well-formed:

void f (int t, char (*buf_p)[sizeof(t)]) {}

but G++ doesn't declare 't' until after the closing paren, so name lookup
fails.

This wasn't a very interesting bug until the advent of late-specified return
types, which relies on naming parameters to be at all useful.


-- 
           Summary: function parameters are declared too late
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37302

Reply via email to