Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!loft386!DSUVAX!ghelmer From: ghelmer@DSUVAX.uucp (Guy Helmer) Newsgroups: comp.os.minix Subject: Re: Compiler Quirks (cdecl port) Summary: Why would this work? Keywords: *yyout = stdout Message-ID: <1989Dec1.154226.3509@DSUVAX.uucp> Date: 1 Dec 89 15:42:26 GMT References: <5674@umd5.umd.edu> <5296@omepd.UUCP> Organization: Dakota State University Lines: 33 In article <5296@omepd.UUCP>, pcm@iwarpr4.intel.com (Phil Miller) writes: > In article <5674@umd5.umd.edu> cgs@umd5.umd.edu (Chris G. Sylvain) writes: > > >Cdecl has compiled, and responds to 'declare i as int' .. after that the > >interesting stuff happens... > >Problem #1: The construct "FILE *yyout = stdout;" generates the error message Is this a compiler error message, or Cdecl message? > > Try enclosing `stdio' in braces, e.g., `{stdio}'. I have seen that work > on other compilers, though note that I haven't tried it on MINIX... Assuming that this is a compiler error message, why would this work at all? stdin, stdout, and stderr are defined as #define stdin (_io_table[0]) #define stdout (_io_table[1]) #define stderr (_io_table[2]) in stdio.h (protected mode 1.4 version) and the array of file pointers, _io_table, isn't filled with real pointers until run time under Minix. Is yyout auto or static? If yyout is auto, this should work if the compiler would accept it, but I'm assuming that this is a static declaration that the compiler wants to initialize at compile time. More input, please? > Phil Miller > pcm@iwarp.intel.com -- Guy Helmer ghelmer@dsuvax.uucp Dakota State University Computing Services helmer@sdnet.bitnet