It's back! (prior parameter's size)

Thu, 17 Jul 1997 15:05:46 +0000


This is a multi-part message in MIME format.

--------------69324B35EA9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Using the attached code, gpc-970714 (with #define HASH_EMBED commented
out in module.c), I get:

C:\source\mpt1352\port>gpc -c -O2 foo.pas
foo.pas: In function `Dectobin':
foo.pas:6: prior parameter's size depends on `Binary'
foo.pas:22: warning: return value of function not assigned

However, if I uncomment out BinToDec, gpc aborts in fix_lexical_addr,
stack trace attached.

Bill
-- 
Leave others their otherness.

-------stack trace for abort (BinToDec uncommented) -----
_abort
_fix_lexical_addr, line 4391 in file function.c
_expand_expr, line 4292 in file expr.c
_expand_expr, line 5235 in file expr.c
_expand_expr, line 4659 in file expr.c
_expand_expr, line 4886 in file expr.c
_emit_library_call_value+1628
_expand_call+4891
_expand_expr, line 5189 in file expr.c
_expand_expr_stmt+253
_rts_read, line 3409 in file util.c
_build_rts_call, line 5232 in file util.c
_yyparse, line 4574 in file parse.c
_compile_file, line 2232 in file toplev.c
_main, line 3938 in file toplev.c
___crt1_startup+290
start+465

--------------69324B35EA9
Content-Type: text/plain; charset=us-ascii; name="foo.pas"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="foo.pas"

unit TrunkUti;
interface

type wrkstring=string[255];

function  BinToDec(Binary: string)   : LongInt;
function  DecToBin(DecInput: string) : wrkstring;

implementation

function BinToDec(Binary: string) : LongInt;
begin
  BinToDec:=0;
end;

function DecToBin(DecInput: string) : wrkstring;
var
   DecNum : word;

begin
  ReadStr(DecInput,DecNum);
end;
end.

--------------69324B35EA9--


Bill Currie (billc@blackmagic.tait.co.nz)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es