Re: [sv-bc] A question about type casting

From: Paul Graham <pgraham@cadence.com>
Date: Fri Mar 19 2004 - 12:46:37 PST

> According to the current definition of casting in 3.16, the
> assignment in the mail below is *not* legal. This is because the total
> number of bits in tx and ty is different, while explicit casting
> currently requires it to be equal.

Bit-stream casting is quite different from the kind of word-level
assignments I was describing. Word-level assignments require the
number of words (unpacked elements) be the same in the source and
target, but the number of bits per word can change, and the total
number of bits in source and target can be different. Bit-stream
casting loses information about the number of words in the source, but
preserves the number of bits. I can see a use for both kinds of
data conversions.

So yes, it looks you can have unpacked array types which are assignment
compatible but not cast compatible!

Paul
Received on Fri Mar 19 12:46:41 2004

This archive was generated by hypermail 2.1.8 : Fri Mar 19 2004 - 12:46:57 PST