This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38545] New: [regression 4.4.0] Conflict between a type and an argument sharing the same name.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]