This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12171] New: calling convention omitted in error message
- From: "gcc at kottalam dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Sep 2003 16:22:49 -0000
- Subject: [Bug c++/12171] New: calling convention omitted in error message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12171
Summary: calling convention omitted in error message
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at kottalam dot net
CC: gcc-bugs at gcc dot gnu dot org
I'm running GCC 3.2 for cygwin and mingw32, using the latest binary
distributions available.
When compiling this code I get the error message:
test.cpp:7: invalid conversion from `void (*)()' to `void (*)()'
which omits the calling convention in the target type, resulting in a very
interesting error message.
My Testcase:
typedef void (__attribute__((__stdcall__)) *FooFuncType)();
void TakesAFoo(FooFuncType TheFoo);
void MyFoo();
int main()
{
TakesAFoo(MyFoo);
}
I built it with: g++ -c test.cpp
Cygwin reports with -v:
Configured with: /netrel/src/gcc-3.2-3/configure --enable-
languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-
zlib --enable-nls --without-included-gettext --enable-interpreter --disable-
sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --
build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-
haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --
includedir=/nonexistent/include --libexecdir=/usr/sbin