C Compiler under Unix System VR4

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Oct 8 23:13:22 AEST 1990


In article <125 at alfrat.uucp> roy at alfrat.UUCP (Roy Phillips) writes:
-The standard header files supplied with AT&T's UNIX System V Release 4.2
-contains pre-processor commands such as the following:
-   #if #machine(pdp11)
-The C preprocessor supplied has no problems with this, but my preferred C
-compiler, gcc, objects, even in it's '-ansi' mode.  So I guess it's
-not ANSI C.  

Correct -- This is a nonstandard extension, and any program using it
is not strictly conforming, meaning that it may be rejected by some
other (standard conforming) C compiler.

-My questions are::
-1. Does anyone know about this pre-processor syntax? and is it
-   supposed to be standard on SysVR4?

Yes, in fact I think this was added around SVR3.2.

In my option, it was ill-conceived, and hinders application portability
rather than enhancing it.



More information about the Comp.lang.c mailing list