(j3.2006) Did we intend to prevent this?
Robert Corbett
robert.corbett
Thu Nov 10 04:47:50 EST 2011
The problem seems worse than Malcolm makes it out to be. Assume a named
constant has a pointer component that is initialized to be pointer associated
with a variable. Item (1) of the list given in Clause 7.1.12 (page 151) is
(1) a constant or a subobject of a constant,
As Val noted, a reference to a pointer component of a named constant will get
the value of the variable that is the target of the pointer component.
According to item (1), that reference to a pointer component can be a primary in
a constant expression. That is not good.
Clause 16.5.2.3 does not cover the case of a target corresponding to an item in
a structure constructor.
Bob Corbett
More information about the J3
mailing list