This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Patch: mingw/cygwin] Don't strip '@' dangles from stdcall/fastcall dllimport references
On 13 July 2007 11:21, Kai Tietz wrote:
>> const char *
>> i386_pe_strip_name_encoding_full (const char *str)
>> {
>> const char *p;
>> - const char *name = default_strip_name_encoding (str);
>> + const char *name;
>> +
>> + if (!TARGET_64BIT)
>> + return name;
>> +
>> + name = default_strip_name_encoding (str);
>>
>> /* Strip leading '@' on fastcall symbols. */
>> if (*name == '@')
>> name++;
>
> AFAICS this seems to be even better, because it avoids diffent
> configuration definitions.
Runtime tests like this are very much the preferred style to #ifdefs :)
> I am on to add function attribute dependent
> amd64 abi usage
Yes, I've been following the thread.
> and there are target specific macros a bit disturbing ;)
It might be best to tidy up some of these from compile-time tests to runtime tests with a set of preparatory patches to clear the ground nicely before generating the patches that make the ABI switchable by attributes.
cheers,
DaveK
--
Can't think of a witty .sigline today....