[sv-bc] can a struct field be a constant expression

From: Paul Graham <pgraham@cadence.com>
Date: Thu Sep 02 2004 - 14:09:47 PDT

Can a reference to a field of a struct be a constant expression? The
syntax for constant_expression and constant_primary don't seem to
include it. I'm thinking of something like:

    const struct { int x; } s = {x:1};
    const int y = s.x;

For what it's worth, vhdl does not allow a record field reference to
be used in a context requiring a locally-static expression.

Paul
Received on Thu Sep 2 14:09:49 2004

This archive was generated by hypermail 2.1.8 : Thu Sep 02 2004 - 14:10:35 PDT