[m-rev.] for review: work-around gcc 3.1 problem

Fergus Henderson fjh at cs.mu.OZ.AU
Fri May 17 03:52:26 AEST 2002


Branches: main
Estimated hours taken: 0.5

Fix a problem where the autoconf configuration test for "gcc structure
assignment conflicts with global register variables" was giving a false
negative with gcc 3.1 on Linux.

configure.in:
	Hard-code the result of the above test to fail for
	gcc versions >= 3.0.

Workspace: /home/ceres/fjh/gcc-3.1/mercury-compiler-rotd-2002-05-12
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.306
diff -u -d -r1.306 configure.in
--- configure.in	9 May 2002 11:49:24 -0000	1.306
+++ configure.in	16 May 2002 17:23:27 -0000
@@ -2341,7 +2341,14 @@
 
 int main() {
 	spied_procs[1] = spied_procs[0];
+#if __GNUC__ >= 3
+	/* gcc 3.1 seems to have problems with structure assignment
+	   and global registers, but which this simple test case
+	   doesn't trigger.  So just force the test to fail for gcc 3.x. */
+	exit(1);
+#else
 	exit(0);
+#endif
 changequote([,]) 
 }],
 [mercury_cv_cannot_use_structure_assignment=no],

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list