Dear all,

I've notice that the following code does not compile with g++ 4.4.0 (trunk). 
It seems to be a regression from g++ 4.3.2, which compiles this code
successfully.

$ cat error.c
class A;

class B
{
  void foo(int A,
           const A*);
};
$ g++ -Wextra -Wall -c error.cc
error.cc:6: error: ISO C++ forbids declaration of ‘A’ with no type
error.cc:6: error: conflicting declaration ‘const int A’
error.cc:5: error: ‘A’ has a previous declaration as ‘int A’
error.cc:6: error: expected ‘,’ or ‘...’ before ‘*’ token


-- 
           Summary: [regression 4.4.0] Conflict between a type and an
                    argument sharing the same name.
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giumfr at gmail dot com


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

Reply via email to