Re: [sv-bc] Mantis 2097

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu Dec 13 2007 - 16:27:57 PST
Steven Sharp wrote:
> I will comment that Gord recently pointed out that the ability to
> pass an element of an unpacked array or struct by reference relies
> on accepting that such things qualify as "variables".  It is hard to
> interpret "singular variable" as excluding a singular element of an
> unpacked array or struct if we want to interpret "variable" as including
> such things for purposes of ref args.
> 
> Of course, it would not hurt if we clarified what can be passed by
> reference anyway.  If it specified that you could pass variables or
> elements of unpacked array or struct variables, then it would avoid
> this problem.

I would be fine with such a clarification.  I'm not sure about
unions and I don't think that tagged union members can be
permitted as ref actuals.  Tagged unions are a bit weird due
to the assumed type safety -- capturing a tagged union member
in a task ref formal where the task suspends and then modifies the
member could break the type safety assumptions.  Unions are
likely acceptable but I'm not sure that I'd want to do that without
further discussion.

At this point, particularly if anyone has any thought about doing
this for 2008, I'd be happy to support a clarification that unpacked
array or unpacked struct elements were permitted but not union or
packed union members.

Gord.
-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Dec 13 16:28:51 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 13 2007 - 16:29:02 PST