This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/39662] segmentation failed on correctly compiled mixed C and C++ code



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-04-22 23:41 -------
#ifdef __cplusplus
#define EXPORTCALL __attribute__((stdcall)) 
#else
#define EXPORTCALL 
#endif


Is wrong, you need to use the same ABI for the function on both sides of the
call, that is either use stdcall on both sides (C and C++) or don't use it at
all.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|segmentation failed on      |segmentation failed on
                   |correctly compiled mixed C  |correctly compiled mixed C
                   |and C++ code                |and C++ code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39662


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]