Re: [sv-bc] assignment pattern to scalar

From: Brad Pierce <brad_pierce@acm.org>
Date: Thu Oct 21 2010 - 08:43:46 PDT

Shalom,

Consider a struct variable with field of enum type, and an attempted
assignment to it of '{default:0}. That wouldn't work, because you
can't assign 0 to a variable of enum type without an explicit cast.

-- Brad

On Thu, Oct 21, 2010 at 2:45 AM, Bresticker, Shalom
<shalom.bresticker@intel.com> wrote:
>
>
> Greg,
>
>
>
> I did not understand what you meant.
>
> Could you clarify?
>
>
>
> Thanks,
>
> Shalom
>
>
>
>
>
> On a related note: we don't allow an assignment pattern to construct an enum
> type.
> As pointless as it seems to still think enums are strongly typed, I'm still
> for requiring that this be done with cast operations,
> unless the committee drastically rewrites section 6.19.3.
>
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Oct 21 08:44:03 2010

This archive was generated by hypermail 2.1.8 : Thu Oct 21 2010 - 08:46:53 PDT