Package: pfe
Severity: normal
Tags: patch
When building 'pfe' on amd64 with gcc-4.0,
I get the following error:
../../../pfe/core-ext.c:2692: error: invalid lvalue in increment
../../../pfe/core-ext.c:2692: warning: value computed is not used
../../../pfe/core-ext.c: In function 'p4_value_RT_SEE':
../../../pfe/core-ext.c:2748: warning: pointer targets in passing argument 2 of
'__builtin_strncat' differ in signedness
../../../pfe/core-ext.c: In function 'p4_value_':
../../../pfe/core-ext.c:2770: error: invalid lvalue in increment
../../../pfe/core-ext.c:2770: warning: value computed is not used
../../../pfe/core-ext.c:2771: error: invalid lvalue in increment
../../../pfe/core-ext.c:2771: warning: value computed is not used
../../../pfe/core-ext.c: At top level:
../../../pfe/core-ext.c:2773: warning: pointer targets in initialization differ
in signedness
make[4]: *** [core-ext.lo] Error 1
make[4]: Leaving directory `/pfe-0.33.34/Release/x86_64-unknown-linux-gnu/pfe'
With the attached patch 'pfe' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/pfe-0.33.34/pfe/def-comp.h ./pfe/def-comp.h
--- ../tmp-orig/pfe-0.33.34/pfe/def-comp.h 2003-09-26 17:16:12.000000000
+0000
+++ ./pfe/def-comp.h 2005-02-28 08:34:51.475876485 +0000
@@ -362,7 +362,7 @@
#if ! defined PFE_CALL_THREADING
#define FX_POP_BODY_ADDR (P4_WP_PFA)
#define FX_POP_BODY_ADDR_(VARNAME) register p4cell* VARNAME = FX_POP_BODY_ADDR
-#define FX_POP_BODY_ADDR_p4_BODY register p4cell* p4_BODY = FX_POP_BODY_ADDR
+#define FX_POP_BODY_ADDR_p4_BODY p4cell* p4_BODY = FX_POP_BODY_ADDR
#define FX_POP_BODY_ADDR_UNUSED
#elif ! defined PFE_SBR_CALL_THREADING
#define FX_POP_BODY_ADDR ((p4cell*)(*IP++))
diff -urN ../tmp-orig/pfe-0.33.34/pfe/def-macro.h ./pfe/def-macro.h
--- ../tmp-orig/pfe-0.33.34/pfe/def-macro.h 2003-03-19 15:50:34.000000000
+0000
+++ ./pfe/def-macro.h 2005-02-28 08:27:45.903019899 +0000
@@ -44,14 +44,7 @@
#endif
/* inc/decrement, push/pop of arbitrary types with arbitrary pointers */
-#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
-/* Use non-ANSI extensions avoiding address-of operator: */
-#define P4_ADD(P,N) ((char *)(P) += (N))
-#define P4_INC(P,T) (((T *)(P))++)
-#define P4_DEC(P,T) (--((T *)(P)))
-#define P4_INCR(P,T,N) (((T *)(P)) += (N))
-#define P4_DECR(P,T,N) (((T *)(P)) -= (N))
-#elif defined MSDOS
+#if defined MSDOS
#define P4_ADD(P,N) ((char *huge)(P) += (int)(N))
#define P4_INC(P,T) (((T *huge)(P))++)
#define P4_DEC(P,T) (--((T *huge)(P)))
@@ -272,11 +265,7 @@
#define P4_IF_FP_(X)
#endif
-#if defined __WATCOMC__ || defined _AIX_CC
#define P4_VAR(_TYPE,_VAR) (*((_TYPE*)&(_VAR)))
-#else
-#define P4_VAR(_TYPE,_VAR) ((_TYPE)(_VAR))
-#endif
/[EMAIL PROTECTED]/
#endif
diff -urN ../tmp-orig/pfe-0.33.34/pfe/engine-set.c ./pfe/engine-set.c
--- ../tmp-orig/pfe-0.33.34/pfe/engine-set.c 2003-10-02 14:59:10.000000000
+0000
+++ ./pfe/engine-set.c 2005-02-28 08:28:14.900422865 +0000
@@ -601,7 +601,7 @@
p4_evaluate (p, n); /* directly from a C' based */
val = 0; /* application which did */
default: /* call InitVM before to get */
- /* an error occurred */ /* a new instance of a PFE */
+ break; /* an error occurred */ /* a new instance of a PFE */
} /* being put on hold for */
PFE_VM_LEAVE(th); /* being Exec'uted finally */
return val;
diff -urN ../tmp-orig/pfe-0.33.34/pfe/fpnostack-ext.c ./pfe/fpnostack-ext.c
--- ../tmp-orig/pfe-0.33.34/pfe/fpnostack-ext.c 2003-03-21 12:41:42.000000000
+0000
+++ ./pfe/fpnostack-ext.c 2005-02-28 08:31:56.800592038 +0000
@@ -670,7 +670,7 @@
*/
FCode (p4_nofp_f_trunc_to_s)
{
- double h = *FSP++;
+ double h = *FSP; SP = (double *)SP + 1;
*--SP = (p4cell) h;
}
diff -urN ../tmp-orig/pfe-0.33.34/pfe/option-ext.c ./pfe/option-ext.c
--- ../tmp-orig/pfe-0.33.34/pfe/option-ext.c 2003-06-26 16:21:11.000000000
+0000
+++ ./pfe/option-ext.c 2005-02-28 08:28:55.764535337 +0000
@@ -274,7 +274,7 @@
xt = p4_create_option (nm, l, sizeof(p4cell), opt);
if (! xt) return 0;
P4_XT_VALUE(xt) = FX_GET_RT (p4_value);
- return ((p4cell*) OPT.dp = defval );
+ return ( OPT.dp = defval );
}
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]