This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: dllimport and __asm__("_alias" )
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 3 Feb 2007 10:12:46 -0500
- Subject: Re: dllimport and __asm__("_alias" )
- References: <000001c7477e$aeb57f10$df6d65da@anykey>
- Reply-to: cygwin at cygwin dot com
On Sat, Feb 03, 2007 at 11:33:00PM +1300, Danny Smith wrote:
>That is, to do the right thing, we would need to:
>
>extern __declspec(dllimport) void foo (void) __asm__("__imp__bar");
>void call_bar(void)
>{ foo(); }
>
>to get
>_call_bar:
> pushl %ebp
> movl __imp__bar, %ecx
> movl %esp, %ebp
> popl %ebp
> jmp *%ecx
>
>Any comments, before I submit the patch to gcc?
>
>Should gcc warn if the asmspec of a dllimport alias lacks the
>"__imp__".
I agree that it shouldn't add the __imp_ automatically. I don't know if
a warning is necessary, though.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/