This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix encode-3.mm


Just a random update to fix:

FAIL: obj-c++.dg/encode-3.mm (test for excess errors)

for Objective-C++ and to better run it when faced with 64-bit support.

Tested on darwin ppc and ppc64.


2006-09-22 Mike Stump <mrs@apple.com>


* obj-c++.dg/encode-3.mm: Fix for 64-bit support.

Doing diffs in .:
--- ./encode-3.mm.~1~   2005-10-28 08:45:10.000000000 -0700
+++ ./encode-3.mm       2006-09-22 17:20:32.000000000 -0700
@@ -14,16 +14,22 @@ Vec<double> dd;
const char *enc = @encode(Vec<float>);
const char *enc2 = @encode(Vec<double>);

+#ifdef __LP64__
+#define L "q"
+#else
+#define L "l"
+#endif
+
int main(void) {
-  char *encode = @encode(long);
+  const char *encode = @encode(long);

-  if (strcmp (encode, "l"))
+  if (strcmp (encode, L))
     abort();

-  if (strcmp (enc, "{Vec<float>=fflq}"))
+  if (strcmp (enc, "{Vec<float>=ff" L "q}"))
     abort();

-  if (strcmp (enc2, "{Vec<double>=ddlq}"))
+  if (strcmp (enc2, "{Vec<double>=dd" L "q}"))
     abort();

   return 0;
--------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]