[m-rev.] for review: fix samples/c_interface/cplusplus_calls_mercury

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Apr 20 16:46:34 AEST 2005


On Tue, Apr 19, 2005 at 02:03:32PM +1000, Ian MacLarty wrote:
> I'm not sure at all if this is the right fix, but the compiler passes a
> bootcheck and all the tests with the following two lines in
> runtime/mercury_types.h removed.
> 

Apparently that wasn't the right fix.  Here's a new fix:

For review by Zoltan.

Estimated hours taken: 3
Branches: main and 0.12

Move the typedefs defined in runtime/mercury_typeclass_info.h to 
runtime/mercury_types.h.  Rename the typedefs and structs to follow the
convention in mercury_types.h.

This fixes the following error which occured when trying to build 
samples/c_interface/cplusplus_calls_mercury:

mgnuc --grade asm_fast.gc     -g   --      -DMR_MACHDEPS_ALPHA_REGS_H -DMR_MACHDEPS_MIPS_REGS_H -DMR_MACHDEPS_SPARC_REGS_H -DMR_MACHDEPS_I386_REGS_H -DMR_MACHDEPS_PA_REGS_H -DMR_MACHDEPS_RS6000_REGS_H -g -c cpp_main.cc
In file included from /home/jupiter/public/mercury-latest/i686-pc-linux-gnu/lib/mercury/inc/mercury_imp.h:76,
                 from cpp_main.cc:1:
/home/jupiter/public/mercury-latest/i686-pc-linux-gnu/lib/mercury/inc/mercury_typeclass_info.h:314: conflicting
   types for `typedef struct MR_Dictionary_Struct MR_Dictionary_Struct'
/home/jupiter/public/mercury-latest/i686-pc-linux-gnu/lib/mercury/inc/mercury_types.h:197: previous
   declaration as `struct MR_Dictionary_Struct'
gmake: *** [cpp_main.o] Error 1

compiler/rtti.m:
	Use the new typedefs TypeClassIdStruct and TypeClassMethodStruct
	instead of TypeClassId and TypeClassMethod.

runtime/mercury_type_tables.c:
	Use the new typedef TypeClassId.

runtime/mercury_typeclass_info.h:
	Remove the typedefs and give the structs tags ending in `_Struct'.
	
runtime/mercury_types.h:
	Declare typedefs for the above structs, following the current 
	convention in mercury_types.h.
--------------------------------------------------------------------------
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