On 09/01/2016 09:04 AM, Martin Sebor wrote:

Understood.  I think a write-only attribute or type qualifier would
make sense.  Until/unless it's implemented I would recommend to work
around its absence by hiding access to the registers behind a read-
only and write-only functional API.
As you noted earlier Martin, if we bake it into the typesystem, then you get the desired warnings when you mix-n-match types. For that reason I see a type qualifier is superior to an attribute.

IIRC the national labs that were looking at the alignment attribute essentially came to the same conclusion -- bake it into the core of the typesystem and rely on the typesystem to ensure you don't lose the data.

Jeff

Reply via email to