[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Re: cobol program generates incorrect C code

From: Keisuke Nishida
Subject: [open-cobol-list] Re: cobol program generates incorrect C code
Date: Sun Nov 30 21:20:02 2003
User-agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI)

At Tue, 25 Nov 2003 18:04:27 -0500 (EST),
David Korn wrote:
> With the open-cobol-0.23.29 compiler, the following program
> produces C code that doesn't compile.
> I ran
>       cobc -static -std=mvs -C -O -fmain prog.cob
> to compile, and prog.c contains the lines 
>   /* MOVE */
>   cob_get_int (&f_WK_IO_STATUS_INDICATORS$WK_RETURN_CODE) = 0;
> which is not valid C.

I have temporarily fixed this in CVS.  The compiler will produce
correct code but without optimization.  In the latest version,
a data item of USAGE COMP is stored as big endian, and I haven't
implemented optimization in this case.

You can change the byte order of COMP fields in the config file
if you want. (Native byte order will be much faster.)  See the
(incomplete) manual for details.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]