Article View: comp.std.c
Article #2110Re: FILE *yyin=stdin; not ANSI-C??
From: Henry Spencer
Date: Fri, 09 Oct 1992 17:12
Date: Fri, 09 Oct 1992 17:12
11 lines
867 bytes
867 bytes
In article <1992Oct8.220811.7882@utwente.nl> emmerik@utrcu1.civ.utwente.nl (Emmerik P.J.L. van) writes:
>The following looks to me perfectly legal ANSI-C code.
>
>FILE *yyin = {stdin}, *yyout = {stdout};
Sorry, it's not. Nothing in ANSI C promises that stdin and stdout are
constants. Therefore they cannot (portably) be used to initialize
extern/static variables.
--
MS-DOS is the OS/360 of the 1980s. | Henry Spencer @ U of Toronto Zoology
-Hal W. Hardenbergh (1985)| henry@zoo.toronto.edu utzoo!henry
Technical Details
Message-ID:
<Bvv6Gn.KEn@zoo.toronto.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!utcsri!utzoo!henryReferences:
<1992Oct8.220811.7882@utwente.nl>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: FILE *yyin=stdin; not ANSI-C?? Message-ID: <Bvv6Gn.KEn@zoo.toronto.edu> Date: Fri, 9 Oct 1992 17:12:22 GMT References: <1992Oct8.220811.7882@utwente.nl> Organization: U of Toronto Zoology Lines: 11