decl.c: Disable Stdcall convention handling for 64-bit.
authorPascal Obry <obry@adacore.com>
Tue, 4 Jan 2011 11:33:39 +0000 (11:33 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 4 Jan 2011 11:33:39 +0000 (11:33 +0000)
* gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r168460

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index 68446aca7474faf5bfd7ab65700425d556cc94f9..fbb70e42b08a2a455a77157bb41be602caa2cf3b 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-04  Pascal Obry  <obry@adacore.com>
+            Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
+
 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
index ad742aa288e7a6274692eb6f218608a8eec83433..a10fc2d74e92cf5b0e2d4adf1fd1124a14d184cd 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2010, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2011, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
 #include "ada-tree.h"
 #include "gigi.h"
 
-/* Convention_Stdcall should be processed in a specific way on Windows targets
-   only.  The macro below is a helper to avoid having to check for a Windows
-   specific attribute throughout this unit.  */
+/* Convention_Stdcall should be processed in a specific way on 32 bits
+   Windows targets only.  The macro below is a helper to avoid having to
+   check for a Windows specific attribute throughout this unit.  */
 
 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+#ifdef TARGET_64BIT
+#define Has_Stdcall_Convention(E) \
+  (!TARGET_64BIT && Convention (E) == Convention_Stdcall)
+#else
 #define Has_Stdcall_Convention(E) (Convention (E) == Convention_Stdcall)
+#endif
 #else
-#define Has_Stdcall_Convention(E) (0)
+#define Has_Stdcall_Convention(E) 0
 #endif
 
 /* Stack realignment is necessary for functions with foreign conventions when