stdcall functions?

Neal Becker ndbecker2 at gmail.com
Thu Apr 26 06:05:29 PDT 2007


Chris Miller wrote:

> On Mon, 23 Apr 2007 17:02:29 -0400, Anders Bergh <anders at andersman.org>
> wrote:
> 
>> __attribute__((__stdcall__)) does nothing in gcc on Linux. Windows and
>> Linux do not share the same ABI, so gcc doesn't care about that
>> attribute on non-Windows OS's as far as I know.
>>
> 
> It's doing something here, on 32 bits. I tested it by marking a function
> definition as stdcall but not its prototype; it linked but did odd things
> before segfaulting. Matching both without stdcall or both with stdcall
> made it work as normal.
> 
> However, I did notice with 64 bits, gcc will ignore the stdcall attribute.
gcc info says:
`stdcall'
     On the Intel 386, the `stdcall' attribute causes the compiler to
     assume that the called function will pop off the stack space used
     to pass arguments, unless it takes a variable number of arguments.




More information about the Digitalmars-d mailing list