Subj : Re: Requirements imposed for non-strictly-conforming programs To : comp.programming.threads,comp.std.c From : Douglas A. Gwyn Date : Fri Feb 18 2005 10:26 am Mime-Version: 1.0 Date: Fri, 18 Feb 2005 17:42:23 GMT X-Mailer: Mozilla 4.79 [en] (X11; U; SunOS 5.8 sun4u) Xref: newsmst01a.news.prodigy.com comp.programming.threads:48853 comp.std.c:66592 David Hopwood wrote: > David Schwartz wrote: > > "David Hopwood" wrote: > >>("A program that is correct in all other aspects, operating on correct > >>data, containing unspecified behavior shall be a correct program and act > >>in accordance with 5.1.2.3.") > > Sure, if it's "correct in all other aspects". This simply provides a > > definition of what it means for a program to be "correct in all other > > aspects". > No, there is no definition of what "correct" means. The point, though, > is that whatever "correct" means, this clause imposes requirements on > implementations for code that is not strictly conforming. Actually it doesn't have any normative effect. The specs apply to all programs and all conforming implementations anyway; if a program violates a syntactic rule or constraint then a diagnostic is required (and the program can be rejected); otherwise, unless undefined behavior is invoked an otherwise conforming program's operation is as the specs say it is. In particular, all that "unspecified behavior" denotes (as specified elsewhere) is that the standard allows the implementation freedom in choosing among the specified alternatives, but it *must* make the choice and honor it. That wording was originally included as a political expedient to placate people who did not want to have their nonportable, but correct, programs labeled as somehow inferior to s.c. programs. .