Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!heg From: heg@otter.hpl.hp.com (Helena Gilchrist) Newsgroups: comp.lang.c++ Subject: Type Checking in C++ Message-ID: <2620022@otter.hpl.hp.com> Date: 19 Jun 91 11:04:41 GMT Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 34 How can type checking be overridden in C++? At first I thought that it meant the ellipses in function declarations, as described in the Lippman book on page 114: Using the ellipses in the function declaration suspends type checking for this function. I wanted to verify this and made the following example: file1: extern void test_func(...); main() { int i=0; test_func(i); } file2: void test_func(int k) {} I compiled it with HP C++ and the linker generated the following message: ld: Undefined external - test_func() The C++ translator generated two different function names for test_func: extern void test_func(...) ---> test_func__Fve test_func(i) ---> test_func__Fve void test_func(int k) ---> test_func__Fi Then I changed the first line in file1 to: extern void test_func(int); After this modification I could compile and link my test program. How can I avoid type checking? Please send reponses to this note to: rolfh@hpbbn.bbn.hp.com or ROLF_HAAS@hpb100.desk.hp.com