TC++ include file SANITY
Ran Atkinson
rja7m at surya.cs.Virginia.EDU
Tue Nov 13 06:44:26 AEST 1990
The use and need for
extern "C" ...
in header files containing both C and C++ code IS documented
in the TC++ manuals that Borland shipped at least since July
(when mine arrived). It is important to keep in mind that
the compiler is both a ANSI C compiler and a C++ 2.0 compiler
and that C isn't C++.
The preprocessor directive in the TC++ <string.h> file appears
correct and is needed for TC++ to comply with the ANSI C X3.159
standard which is quite specific about what is and isn't allowable
in headers (with respect to namespace). Borland supplies a number
of extra non-ANSI functions which are quite properly only visible
when one isn't requiring strict ANSI compliance (there are compiler
switches to set ANSI or not) and Borland has done it the right way
and complied with X3.159's requirements.
In short, Borland has been nice enough to not only add some useful
extensions but has also done so in a way which protects the programmer
trying to write a strictly conforming ANSI C program.
In general, Borland's TC++ is very ANSI compliant and there are things
where one's personal dialect of traditional C is not ANSI compliant
and one should not be too hasty in complaining about the ANSI compiler
when the real problem is that one isn't familiar with ANSI C.
<<Followups have been redirected to comp.lang.c since the
discussion hasn't been about C++ really>>
More information about the Comp.lang.c
mailing list