[m-dev.] mainline regression: io.buffer vs ISO C

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Dec 24 02:24:10 AEDT 2002


Pete,

The following change

> revision 1.282
> date: 2002/12/04 09:39:37;  author: petdr;  state: Exp;  lines: +63 -36
> 
> Estimated hours taken: 2
> Branches: main
> 
> Get io__read_file_as_string working on the il backend.
> 
> library/io.m:
>         Implement the buffer type as a Mercury type, in addition to as
>         a C array.

appears to be responsible for the following stage 1 compile error
when compiling with lcc:

$ tail -20 $HOME/logs/test-latest-mars-lcc.out
gmake[1]: Entering directory `/home/mars/public/test_mercury_mars/build.latest.lcc/mercury/library'
../scripts/mgnuc --grade hlc.gc      --no-mercury-stdlib-dir  --no-ansi --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -I. -IMercury/mihs/. -c Mercury/cs/io.c -o Mercury/os/io.o
Mercury/cs/io.c: io.m:2223: operands of = have illegal types `pointer to char' and `unsigned int'
Mercury/cs/io.c: io.m:2176: operands of = have illegal types `pointer to char' and `unsigned int'
Mercury/cs/io.c: io.m:2128: operands of = have illegal types `pointer to char' and `unsigned int'
Mercury/cs/io.c: io.m:2223: operands of = have illegal types `pointer to char' and `unsigned int'
Mercury/cs/io.c: io.m:2176: operands of = have illegal types `pointer to char' and `unsigned int'
Mercury/cs/io.c: io.m:2128: operands of = have illegal types `pointer to char' and `unsigned int'
gmake[1]: *** [Mercury/os/io.o] Error 1
gmake[1]: Leaving directory `/home/mars/public/test_mercury_mars/build.latest.lcc/mercury/library'
gmake: *** [library] Error 2
+ echo 'building of stage 1 not successful'
building of stage 1 not successful
+ exit 1

The lines containing the error are C code of the form
"Buffer = (MR_Word) buffer", which is wrong now, since
the type of "Buffer" has changed from `MR_Word' to `MR_Char *'.

Pete, could you please fix this one?

-- 
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-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