Re: unresolved externals
Posted in 1997
>From ilist@rmy.emory.edu Wed Aug 20 03:37 PDT 1997 >From: Frido van Orden <FridoO@faapartners.com> >Subject: unresolved externals >Date: Mon, 11 Aug 1997 13:08:48 +0200 >To: informix-list@rmy.emory.edu >X-Informix-List-Id: <news.41856> Frido, I note that you sent this message on Monday, but it only reached the c.d.i news/mail gateway on Wednesday -- it spent two days hibernating somewhere... >Does anybody know a way to force the NewEra compiler to perform strong >function type checking. It's very annoying that a function call > > LET ok = nonsense() > >in your source is only figured out at link time to be invalid, when >compiling to C code. Can't be hard to check this, >as NE does when calling a class member function. >Is this a trick of Informix to force programmers to develop OO style >classes or just a stupidity? (probably the last) I don't think there is a way to do that. It is hard to check that all functions called are defined, since while the compiler is processing file1.4gl, it cannot tell which functions will be defined in file2.4gl, etc. Only the linker knows exactly which functions are defined, so only the linker can report on missing functions. There is also a legacy (backwards compatability) issue. Once upon a time, NewEra was going to be 4GL++, and would accept any I4GL program. No I4GL program ever declared any function, so NewEra allowed undeclared functions to be used -- unlike C++ which insists that all functions are declared before use. So, No, it isn't a trick, nor is it stupidity. It was a deliberate design decision. Whether it was the best possible design decision is a separate issue, especially since the I4GL-compatability fell by the wayside before NewEra was released, but there was neither the time nor the necessity to reconsider every such design decision when the compatability was dropped. Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h>