[m-rev.] for review: fix library header files overriding system header files

Simon Taylor stayl at cs.mu.OZ.AU
Thu Sep 6 02:55:23 AEST 2001

On 03-Sep-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> I'm not sure whether it's a good idea to commit this change.

It wasn't a good idea, it caused compilation failures in the
GCC sources. I've backed it out.


> Estimated hours taken: 6
> scripts/mgnuc.in:
> scripts/mercury_compile.m:
> 	Don't allow header files generated by the Mercury compiler
> 	to override the system header files. Unfortunately, this fix
> 	only works with GCC. We should avoid generating header files
> 	which clash with system headers.
> 	This fixes a problem that caused the compiler compiled with
> 	`--intermodule-optimization' to go into an infinite loop during
> 	termination analysis while compiling list.m. I think this problem
> 	was triggered by Tyson's change to implement exception handling
> 	for the .NET backend, which added a `:- pragma export' declaration
> 	to library/math.m. The generated library/math.h file was being
> 	selected in preference to /usr/include/math.h, which was causing
> 	compiler/term_pass1.c to be miscompiled. 
> 	This change shouldn't be needed at the moment. My change to improve
> 	error handling in the library removed the `:- pragma export'
> 	declaration from math.m.

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