Re: [Mingw-w64-public] the compiler treats '__cdecl' '__stdcall' as the same.

2012-10-10 Thread Ruben Van Boxem
2012/10/10 niXman i.nix...@gmail.com Hello, When I compile this simple code: void myfoo(void(__cdecl*)()){} void myfoo(void(__stdcall*)()){} int main(){} I get the following error: Assembler messages: Error: symbol `__Z5myfooPFvvE' is already defined Why the compiler treats theese

Re: [Mingw-w64-public] the compiler treats '__cdecl' '__stdcall' as the same.

2012-10-10 Thread Ozkan Sezer
On 10/10/12, niXman i.nix...@gmail.com wrote: Hello, When I compile this simple code: void myfoo(void(__cdecl*)()){} void myfoo(void(__stdcall*)()){} int main(){} I get the following error: Assembler messages: Error: symbol `__Z5myfooPFvvE' is already defined Why the compiler treats

Re: [Mingw-w64-public] the compiler treats '__cdecl' '__stdcall' as the same.

2012-10-10 Thread Ozkan Sezer
On 10/10/12, niXman i.nix...@gmail.com wrote: 2012/10/10 Ozkan Sezer: Because the names of the two functions are the same, i.e. myfoo This is a C++ code. Arguments for functions are of different types, ie overload should work. MSVC 2010 compiles this code successfully. Ah sorry, didn't

Re: [Mingw-w64-public] the compiler treats '__cdecl' '__stdcall' as the same.

2012-10-10 Thread niXman
2012/10/10 niXman: For example, this code work as expected: templatetypename T, typename U struct is_same { enum { value = 0 }; }; templatetypename T struct is_sameT, T { enum { value = 1 }; }; int main() { typedef void(__stdcall* stdcall_func_ptr)();

Re: [Mingw-w64-public] the compiler treats '__cdecl' '__stdcall' as the same.

2012-10-10 Thread Kai Tietz
2012/10/10 niXman i.nix...@gmail.com: For example, this code work as expected: templatetypename T, typename U struct is_same { enum { value = 0 }; }; templatetypename T struct is_sameT, T { enum { value = 1 }; }; int main() { typedef void(__stdcall*