This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with bit-field semantics in C and C++


On Tuesday, August 24, 2004, at 02:42 PM, David Carlton wrote:
Just to clarify: I agree that, it's okay if, on one run of the
program, the program behaves as if it's 0 and on another run of the
program, the program behaves as if it's 1, or other similar
pathologies.  But I don't see how the standard allows the program to
behave as if the value is neither 0 nor 1.

(E)n, where n is an int with value, say of 7, is permitted by the standard to take on the value 7. This is because the text of the standard says the value is unspecified. 7 is a unspecified value, honest.


the assignment to x of (E)n, is permitted to bit-wise copy the value into x.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]