Ticket #2276 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

foreign import stdcall "&foo" doesn't work

Reported by: simonmar Owned by: igloo
Priority: normal Milestone: 6.8.3
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Importing a label with the stdcall calling convention fails to remember the stdcall attribute and add the appropriate '@n' suffix to the label on Windows. e.g.

foreign import stdcall "&foo" foo :: FunPtr (CInt -> IO ())

should result in a reference to "foo@4", but doesn't. This breaks the Win32 library, which does something like this for genericWndProc in Graphics/Win32/Window.hsc.

Somewhat related to to #1288 .

Change History

Changed 5 years ago by simonmar

  • owner set to igloo
  • type changed from bug to merge
  • milestone changed from _|_ to 6.8.3

Fixed. This can be merged, but omitting the changes to PprC and CLabel which aren't necessary on the stable branch.

Wed May 14 01:24:22 PDT 2008  Simon Marlow <simonmar@microsoft.com>
  * FIX #2276: foreign import stdcall "&foo" doesn't work

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Merged (with the PprC and CLabel bits omitted)

Note: See TracTickets for help on using tickets.