gnucobol-users
[Top][All Lists]
Advanced

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

RE: [open-cobol-list] Problem for developers - Keisuke ?


From: Bill Klein
Subject: RE: [open-cobol-list] Problem for developers - Keisuke ?
Date: Wed Feb 16 15:43:11 2005

ISO 2002 Standard, Page 336 (RENAMES clause)
  SR(7) None of the items within the range, including data-name-2 and
data-name-3, if specified, shall be of class
object or pointer, a strongly-typed group item, an item subordinate to a
strongly-typed group item, or a
variable-occurrence data item.

>From IBM Enterprise COBOL, 
 
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR20/5.3.16.8


"A pointer data item can be used only: 
 - In a SET statement (format 5 only) 
 - In a relation condition 
 - In the USING phrase of a CALL statement, an ENTRY statement, or the
procedure division header"

>From Micro Focus LRM, (USAGE Clause)

"A pointer or procedure-pointer item can be referenced explicitly only in a
SET statement, a relation condition, a CALL statement, the USING phrase of a
Procedure Division, the USING statement of an ENTRY statement an INVOKE
statement, the argument list of an inline invocation of a method, the
argument list of a function."

   ***

So I don't know what you suggested code does, but a REDEFINES or RENAMES
should NOT be allowed of a POINTER data item.

 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden On 
> Behalf Of Roger While
> Sent: Wednesday, February 16, 2005 4:52 PM
> To: address@hidden
> Subject: [open-cobol-list] Problem for developers - Keisuke ?
> 
> We have :
> 01  MYPTRA  USAGE POINTER
> 
> 01  SOMEVAR.
>         03 ..........
>         03  MYPTRB   USAGE POINTER.
>         03  ...........
> 
> 66  MYPTR66 RENAMES MYPTRB.
> 
> Now comes a
>       SET MYPTRA TO MYPTR66.
> or vice-versa.
> 
> That blows the compiler with a seg fault.
> 
> The fix that I think works is in cob/codegen.c at line 570 :
>         struct cb_field *f = cb_field (x);
> Insert after this line -
>         if ( f->redefines )
>              f = f->redefines;
> 
> However, I think the verification should be done much earlier,
> Can someone verify this is correct or suggest an alternative.
> 
> There is also still a problem with BY VALUE that I am looking at.
> 
> Roger
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
> 


reply via email to

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