Quote:Original post by rip-offQuote:Original post by polymorphed
So what you're basically saying, Enigma, is that:
Right?
Exactly.
Well, in theory anyways. In practice ... well, welcome to the world of compiler bugs. In MSVC, if you use:
void func (int myarray[5]) {}void func (int * myarray) {}
in a single file, the compiler will complain that the function already has a body, as it should.
However, if you put the two definitions in different translation units, they will link despite the multiple definitions. The problem is that MSVC name mangles the two function signatures differently, so even though they should be the same function the different prototypes will resolve to different names.