Re: Is fastcall broken?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Daniel Lohmann-2 wrote:
> 
> Angus schrieb:
>> 
>> Andrew Haley-5 wrote:
>> 
>>    BTW, in my opinion it is dangerous. Usually one can rely on compile or
>> link errors to catch mismatched function characteristics, but with
>> attributes there is no such checking. So even if you aren't doing
>> something
>> *really* dangerous, like working with virtual methods, you might do what
>> I
>> did, and you'll never know about it until you notice you've mismatched
>> your
>> attributes. So if you ask me, attributes like this one should be used
>> sparingly, and with much caution.
> 
> I would consider this as a significant defect of gcc's attribute handling. 
> Attributes that change a function to a non-standard calling convention 
> effectively modify the interface of the function, which should be encoded 
> into the (mangled) symbol name. Thereby incompatible prototypes on on the 
> caller and callee side could be detected at link-time.
> 
> Other compilers, such as Visual C++, do this. Modifiers different than the 
> default calling convention become mangled into the resulting linker
> symbol.
> 
> Daniel
> 
> The fastcall and stdcall for windows target's on GCC are decorated. See
> gcc/config/i386/winnt.c:
> i386_pe_mangle_decl_assembler_name
> Danny
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Is-fastcall-broken--tf3995991.html#a11377169
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux