__chip is evil

Guy Harris guy at auspex.auspex.com
Wed Jan 17 05:13:00 AEST 1990


>I would have thought that something like
>
>#pragma K&R
>
>would be highly desired, for those cases where the traditional unix
>interpretation of K&R has been different .....

How about the "-Xt" flag, such as, if I remember correctly, appears in
AT&T's S5R4 C compiler?  The "traditional UNIX interpretation of K&R"
didn't include "#pragma", so the proper response of the compiler to such
a #pragma might be to turn the "K&R" flag on and then reject the
"#pragma".... :-)

More to the point, it's probably easier to whack your Makefile to put in
"-Xt", or some such flag (I think GCC has a similar flag, but with a
different name) than to whack all your source files to include the
"#pragma".

>Is everyone that certain that old codes don't matter anymore ? Or is
>this not the preferred "spelling" ?

"Spelling" of what?  I prefer "programs" to "codes", myself, but then I
don't really come from the scientific programming community. :-)

No, I don't think anyone's certain that C programs written to older C
semi-standards and implementations don't matter.  However, they may not
think that a "#pragma" is the right solution, either....



More information about the Comp.std.c mailing list