Menu

#395 misleading description of implicit dereferencing  Edit

compiler
open
nobody
None
2023-11-16
2022-07-18
No

The language report states in section 5.9:

Furthermore, a reference variable is dereferentiated implicitly,
• if it is the actual parameter of a procedure call, and if the formal parameter belonging to it is no reference variable.
• if it is used as operand of a dyadic operator, as far as the latter is not defined for values of reference variables like IS (see below).

This should also occur with monadic operators, except SIZEOF.
SIZEOF of a STRUCT containing a REF counts the size of the REF and not of the object. An implicit dereference would create confusion.

This ticket effects:

  • the language report
  • the compiler

Discussion

  • Rainer Müller

    Rainer Müller - 2022-09-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,15 +1,13 @@
     The language report states in section 5.9:
    
     >  Furthermore, a reference variable is dereferentiated implicitly,
    ->    • if it is the actual parameter of a procedure call, and if the
    ->      formal parameter belonging to it is no reference variable.
    ->    • if it is used as operand of a dyadic operator, as far as the latter
    ->      is not defined for values of reference variables like IS (see
    ->      below).
    +>    • if it is the actual parameter of a procedure call, and if the  formal parameter belonging to it is no reference variable.
    +>    • if it is used as operand of a dyadic operator, as far as the latter   is not defined for values of reference variables like IS (see  below).
    
    -This should also occur with manadic oprators, except SIZEOF.
    -SIZEOF of a STRUCT containing a REF counts the size of the REF and not of the object. An implicit dereference would create confusion.
    +This should also occur with monadic operators, except `SIZEOF`.
    +`SIZEOF` of a `STRUCT` containing a `REF` counts the size of the `REF` and not of the object. An implicit dereference would create confusion.
    
     This ticket effects:
    +
     * the language report
     * the compiler
    
     
  • Rainer Müller

    Rainer Müller - 2022-09-01
    • summary: nmisleading description of implicit dereferencing --> misleading description of implicit dereferencing
     
  • Rainer Müller

    Rainer Müller - 2023-11-16

    Discussion in Boippard:
    agreed

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB