mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Fix failure of debugger/tailrec1.
The prototype for mercury_get_byte() was not visible in the foreign code for
this test case. This caused the generated C code not to compile on systems
where the C compiler had strict C99 conformance enabled or where treating
warnings as errors was enabled.
tests/debugger/tailrec1.m:
Foreign import io.primitives_read so that prototype for
mercury_get_byte() is visible to the C code in this module.
Document what each expected output is for.
tests/debugger/tailrec1.exp:
Conform to the above change. XXX The term size profiling grades
are suffering from some bitrot, the .exp2 file can be fixed
when they are.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
E1: C1 CALL pred tailrec1.main/2-0 (det) tailrec1.m:19
|
||||
E1: C1 CALL pred tailrec1.main/2-0 (det) tailrec1.m:23
|
||||
mdb> echo on
|
||||
Command echo enabled.
|
||||
mdb> register --quiet
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
%---------------------------------------------------------------------------%
|
||||
% vim: ts=4 sw=4 et ft=mercury
|
||||
%---------------------------------------------------------------------------%
|
||||
% The .exp file is for when term size profiling is not enabled.
|
||||
% The .exp2 is for when term size profiling is enabled.
|
||||
%---------------------------------------------------------------------------%
|
||||
|
||||
:- module tailrec1.
|
||||
|
||||
:- interface.
|
||||
|
||||
:- import_module io.
|
||||
@@ -16,6 +18,8 @@
|
||||
:- import_module list.
|
||||
:- import_module string.
|
||||
|
||||
:- pragma foreign_import_module("C", io.primitives_read).
|
||||
|
||||
main(!IO) :-
|
||||
io.open_input("tailrec1.data", Result, !IO),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user