[m-dev.] [aj at andaco.de: Bug#297217: mercury: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment]
Peter Hawkins
peter at hawkins.emu.id.au
Tue Mar 1 12:47:05 AEDT 2005
Hi..
I received this bug report through the debian bts. It appears gcc 4.0
finally removed the deprecated lvalue assignment 'feature'.
Please apply?
=)
Peter
----- Forwarded message from Andreas Jochens <aj at andaco.de> -----
X-Original-To: phawkins at trinity.unimelb.edu.au
Subject: Bug#297217: mercury: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment
Reply-To: Andreas Jochens <aj at andaco.de>, 297217 at bugs.debian.org
Resent-From: Andreas Jochens <aj at andaco.de>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-Cc: Peter Hawkins <peterh at debian.org>
Resent-Date: Sun, 27 Feb 2005 23:18:05 UTC
Resent-Message-ID: <handler.297217.B.11095457404048 at bugs.debian.org>
X-Debian-PR-Message: report 297217
X-Debian-PR-Package: mercury
X-Debian-PR-Keywords: patch
To: Debian Bug Tracking System <submit at bugs.debian.org>
From: Andreas Jochens <aj at andaco.de>
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Resent-Sender: Debian BTS <debbugs at bugs.debian.org>
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at trinity.unimelb.edu.au
X-Spam-Status: No, hits=0.0 tagged_above=-100.0 required=5.0 tests=
X-Spam-Level:
Package: mercury
Severity: normal
Tags: patch
When building 'mercury' on amd64 with gcc-4.0,
I get the following error:
../scripts/mgnuc --grade hlc.gc --no-mercury-stdlib-dir --c-debug --no-ansi -- -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -DMERCURY_BOOTSTRAP_H -DMERCURY_CONF_BOOTSTRAP_H -c mercury_deep_copy.c -o mercury_deep_copy.o
In file included from mercury_deep_copy.c:52:
mercury_deep_copy_body.h: In function 'MR_deep_copy':
mercury_deep_copy_body.h:387: error: invalid lvalue in assignment
mercury_deep_copy_body.h:425: error: invalid lvalue in assignment
mercury_deep_copy_body.h: In function 'MR_deep_copy_type_info':
mercury_deep_copy_body.h:762: error: invalid lvalue in assignment
mercury_deep_copy_body.h:771: error: invalid lvalue in assignment
mercury_deep_copy_body.h: In function 'MR_deep_copy_typeclass_info':
mercury_deep_copy_body.h:831: error: invalid lvalue in assignment
make[3]: *** [mercury_deep_copy.o] Error 1
make[3]: Leaving directory `/mercury-0.11.0.rotd.20040511/build/mercury/runtime'
With the attached patch 'mercury' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/mercury-0.11.0.rotd.20040511/debian/patches/004-gcc4-fix.diff ./debian/patches/004-gcc4-fix.diff
--- ../tmp-orig/mercury-0.11.0.rotd.20040511/debian/patches/004-gcc4-fix.diff 1970-01-01 00:00:00.000000000 +0000
+++ ./debian/patches/004-gcc4-fix.diff 2005-02-27 22:38:50.305442176 +0000
@@ -0,0 +1,22 @@
+diff -urN tmp/mercury/runtime/mercury_regs.h mercury/runtime/mercury_regs.h
+--- tmp/mercury/runtime/mercury_regs.h 2005-02-27 22:35:19.102208000 +0000
++++ mercury/runtime/mercury_regs.h 2005-02-27 22:36:53.030078485 +0000
+@@ -19,15 +19,9 @@
+ ** Similarly for comma expressions and conditional expressions.
+ */
+
+-#ifdef __GNUC__
+- #define MR_LVALUE_CAST(type, lval) ((type)(lval))
+- #define MR_LVALUE_SEQ(expr, lval) ((expr),(lval))
+- #define MR_LVALUE_COND(expr, x, y) ((expr)?(x):(y))
+-#else
+- #define MR_LVALUE_CAST(type, lval) (*(type*)&(lval))
+- #define MR_LVALUE_SEQ(expr, lval) (*((expr),&(lval)))
+- #define MR_LVALUE_COND(expr, x, y) (*((expr)?&(x):&(y)))
+-#endif
++#define MR_LVALUE_CAST(type, lval) (*(type*)&(lval))
++#define MR_LVALUE_SEQ(expr, lval) (*((expr),&(lval)))
++#define MR_LVALUE_COND(expr, x, y) (*((expr)?&(x):&(y)))
+
+ #define MR_fake_reg (MR_ENGINE(MR_eng_fake_reg))
+
----- End forwarded message -----
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list