Opened 15 years ago

Closed 12 years ago

#1470 closed Patches (fixed)

Boost.Thread: Compilation errors with non-__cdecl calling convention

Reported by: Francois Barel Owned by: Anthony Williams
Milestone: To Be Determined Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: thread __cdecl Cc:

Description

Hi,

On Win32, Boost.Thread currently (r41287) doesn't compile when the compiler's default calling convention is not __cdecl (e.g. with option /Gz under MSVC, which defaults functions to __stdcall if no other calling convention is specified).

This is because some function pointers are (correctly) explicitely declared __cdecl, but are then assigned with the addresses of functions with no explicit calling convention specified -- which is incorrect. Those functions should be explicitely __cdecl as well.

I suggest applying the attached patch (in trunk/) to fix that behavior.

Cheers, Francois

Attachments (1)

BTL-calling-conv.diff (3.3 KB ) - added by Francois Barel 15 years ago.

Download all attachments as: .zip

Change History (3)

by Francois Barel, 15 years ago

Attachment: BTL-calling-conv.diff added

comment:1 by viboes, 12 years ago

Type: BugsPatches

comment:2 by Anthony Williams, 12 years ago

Resolution: fixed
Status: newclosed

Fixed on trunk

Note: See TracTickets for help on using tickets.