https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70943

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-05-06
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.5.3, 4.8.3, 4.9.3, 5.3.0,
                   |                            |6.1.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  The following C++ 98 test case is also rejected with similar
errors, going as far back as 4.5.3. 

template <class T>
void foo (T) {
    typedef T X;
    typedef int X;

    extern T bar ();
    extern int bar ();
}

template void foo (int);
xxx.c: In function ‘void foo(T)’:
xxx.c:4:17: error: conflicting declaration ‘typedef int X’
     typedef int X;
                 ^
xxx.c:3:15: note: previous declaration as ‘typedef T X’
     typedef T X;
               ^
xxx.c:7:16: error: ambiguating new declaration of ‘int bar()’
     extern int bar ();
                ^~~
xxx.c:6:14: note: old declaration ‘T bar()’
     extern T bar ();
              ^~~

Reply via email to