GPC and Mac implicit pointer objects
Waldek Hebisch
hebisch at math.uni.wroc.pl
Fri Jul 22 00:30:42 CEST 2005
Adriaan van Os wrote:
> With the various MacPascal/Delphi object support patches posted on this
> list, fjf903c.pas (in the testsuite) crashes gpc.
>
<snip>
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000034
>
> Thread 0 Crashed:
> 0 gpc1 0x0006ab7c dbxout_type + 0x1e74 (dbxout.c:1020)
Apparently dbxout.c assumes that all object look like C++ objects.
The following backend patch should fix the crash:
--- gcc-3.4.3/gcc/dbxout.c.bb 2005-06-14 03:33:07.000000000 +0200
+++ gcc-3.4.3/gcc/dbxout.c 2005-07-22 00:17:41.389503512 +0200
@@ -1011,13 +1011,17 @@
tree type_encoding;
tree fndecl;
tree last;
+#ifndef GPC
char formatted_type_identifier_length[16];
int type_identifier_length;
+#endif
if (methods == NULL_TREE)
return;
+#ifndef GPC
type_encoding = DECL_NAME (TYPE_NAME (type));
+#endif
#if 0
/* C++: Template classes break some assumptions made by this code about
@@ -1037,9 +1041,11 @@
}
#endif
+#ifndef GPC
type_identifier_length = IDENTIFIER_LENGTH (type_encoding);
sprintf (formatted_type_identifier_length, "%d", type_identifier_length);
+#endif
if (TREE_CODE (methods) != TREE_VEC)
fndecl = methods;
--
Waldek Hebisch
hebisch at math.uni.wroc.pl
More information about the Gpc
mailing list