Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion ANSI C & MICROSOFT.

From: f...@genesis.demon.co.uk (Lawrence Kirby)
Subject: Re: ANSI C & MICROSOFT.
Date: 1998/09/27
Message-ID: <906859191snz@genesis.demon.co.uk>#1/1
X-Deja-AN: 395213245
References: <6uc5fn$jp8$1@supernews.com> <3609EBFA.32BC@CWA.de> <danpop.906640305@news.cern.ch> <360B387F.7613@CWA.de>
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!genesis.demon.co.uk
X-Trace: mail2news.demon.co.uk 906861994 mail2news:4886 mail2news mail2news.demon.co.uk
Organization: none
Reply-To: f...@genesis.demon.co.uk
Newsgroups: comp.lang.c

In article <360B387F.7...@CWA.de> Stephan.Wi...@CWA.de "Stephan Wilms" writes:

...

>> Again, no ANSI C violation.  If you include a nonstandard header, you're
>> invoking undefined behaviour. 
>
>Undefined or implementation defined ?

Both. :-)

The immediate action that the implementation must perform (more specifically
its search strategy) is implementation-defined. However the important thing
as far as the program is concerned is what effect the inclusion will have
on the program. If a standard header is included the standard itself
specifies the effect. If a non-standard header is included the contents and
effect of that header are unknownand this results in undefined behaviour,
*unless* the contents of the header are specified as part of the program
definition. So if foo.c includes foo.h and foo.h is part of the program
source there is no problem. But if you include a non-standard headers
supplied by the implementation the behaviour of the *program* is undefined
as far as standard C is concerned.

-- 
-----------------------------------------
Lawrence Kirby | f...@genesis.demon.co.uk
Wilts, England | 70734....@compuserve.com
-----------------------------------------