This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22573] New: typedef in class scope not reported by error message
- From: "brad dot king at kitware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2005 18:02:21 -0000
- Subject: [Bug c++/22573] New: typedef in class scope not reported by error message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider the following code snippet:
--------------------------
namespace N {
typedef int Int;
struct A {
typedef float Float;
void f(Int, Float);
};
}
int main() {
N::A a;
a.f(1);
return 0;
}
--------------------------
The command
g++ -c gccBug1.cxx
produces the error message
gccBug1.cxx: In function 'int main()':
gccBug1.cxx:11: error: no matching function for call to 'N::A::f(int)'
gccBug1.cxx:5: note: candidates are: void N::A::f(N::Int, float)
The signature reported for the candidate "f" uses the typedef name from the
namespace-scope typedef but not from the class-scope typedef.
-------------------------------------------------------------------------
I'm using gcc version 4.0.1 configured like this
../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--enable-nls --without-included-gettext --enable-threads=posix
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-mpfr --disable-werror --enable-checking=release
i486-linux
though the bug does not seem to depend on the platform or configuration at all.
--
Summary: typedef in class scope not reported by error message
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brad dot king at kitware dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-linux
GCC host triplet: i486-linux
GCC target triplet: i486-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22573