mutchler@pitstop.UUCP (Dan Mutchler) (02/09/89)
I have found a minor annoyance in the Zortech C++ compiler if you want to enforce strict ANSI compliance (-A) at compile time. The dos.h file contains several declarations that use the keyword "far" which is not part of the ANSI standard and causes the compiler to complain, as it should. The killer is that there are flags in that file required for routines like open. The most obvious fix, that Zortech should do is move all I/O declarations to io.h, as the documentation would lead you to believe is the case, but a quick fix is bracket the far declarations with: #if __STDC__ != 1 ... #endif These occur at lines 55-69 in my copy (version 1.07). I hope this is of use to someone. I grepped all of the include files and dos.h seems to be the only one with "far" or "near" keywords in it. Dan Mutchler sun!zule!mutchler Sun Microsystems
stoppani@hpcupt1.HP.COM (Peter Stoppani) (02/11/89)
Dan Mutchler writes: >> I have found a minor annoyance in the Zortech C++ compiler if you want >> to enforce strict ANSI compliance (-A) at compile time. The dos.h file >> contains several declarations that use the keyword "far" which is not >> part of the ANSI standard and causes the compiler to complain, as it >> should. The killer is that there are flags in that file required for >> routines like open. The most obvious fix, that Zortech should >> do is move all I/O declarations to io.h, as the documentation would >> lead you to believe is the case, but a quick fix is bracket the >> far declarations with: >> >> #if __STDC__ != 1 >> ... >> #endif >> >> These occur at lines 55-69 in my copy (version 1.07). I hope this is >> of use to someone. I grepped all of the include files and dos.h seems >> to be the only one with "far" or "near" keywords in it. >> There is a similar problem when you use the 'strict function prototyping' option (-r I think) with code that uses any of the DOS related functions to perform DOS interrupts. The problem is that dos.h does not contain the function prototypes for any of these functions. It would be very nice if Zortech would ensure that all their functions will compile with the 'strict prototyping option'. Especially since this is a very useful option when trying to write 'correct' C++ code. Pete Stoppani I'm using version 1.05. My opions are my own and nobody elses!