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 03:31 PM, Joe Buck wrote:
On Tue, Aug 24, 2004 at 02:58:33PM -0700, Mark Mitchell wrote:
The people who write testsuites for a living think a lot about corner
cases and try to write tests that cause compilers to get the corner
cases wrong. They go through the standard line-by-line, thinking of
pathological things. None of them have ever written the test that David
is suggesting.

But the suggested test is clearly a non-conforming program, one whose behavior is unspecified.

Man, talk about mixing metaphors...


First, non-conforming doesn't exist in C++, that is from the C standard.
Second, the you are thinking about a strictly conforming program:

       [#5] A strictly conforming  program  shall  use  only  those
       features  of  the  language  and  library  specified in this
       International  Standard.2)   It  shall  not  produce  output
       dependent on any unspecified, undefined, or  implementation-
       defined   behavior,   and   shall  not  exceed  any  minimum
       implementation limit.

a conforming program is different:

       [#7]  A  conforming  program  is one that is acceptable to a
       conforming implementation.4)

Because the program is accepted, it is a conforming program, because it is conforming, it cannot be non-conforming.


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