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:09, Danny Smith wrote:
> + /* _WIN64 does not decorate stdcall DLLIMPORTS with @n suffix,
> + _WIN32 does. */
> + #if TARGET_64BIT
> #undef TARGET_STRIP_NAME_ENCODING
> #define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
> + #endif
:) I don't think you can use target flags like that. Something more like (untested):
#undef TARGET_STRIP_NAME_ENCODING
#define TARGET_STRIP_NAME_ENCODING i386_pe_strip_name_encoding_full
/* Also strip the fastcall prefix and stdcall suffix. */
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++;
cheers,
DaveK
--
Can't think of a witty .sigline today....