------- Comment #28 from dj at redhat dot com 2010-08-12 18:08 ------- I built your test case with gcc and g++ without optimizations, and it worked fine. I could only get it to fail with gcc/g++ by optimizing, but then, I could get it to fail with MSVC by optimizing. Seems to me, gcc and MSVC are doing the same thing, or you have some modified version of gcc that is not acting the same way as the official version.
Also, please provide an official spec for this "cdecl" you keep referring to. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45265