[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why does potato compiling suck?

On Sun, 5 Dec 1999, Zed Pobre wrote:
> On Sun, Dec 05, 1999 at 06:39:13PM +0000, Peter Allen wrote:
> > It is indeed a linking error.  A quick search says the libraries
> > that you need to link with are -lICE -lSM.
> FWIW, I think this *IS* a recent bug in potato.  I have several
> packages that suddenly required this sort of explicit declaration that
> didn't originally.  Fumbling through the documentation leads me to

Speaking of changes in potato's compiler behavior for the worse, this one
makes at least one current package in debian no longer compile.  Consider
the following example:

$ echo " 
void f (const char *& str) {}
void main ()
	char *s;
" > s.cpp

$ g++ s.cpp -o s.o
s.cpp: in function `int main(...)':
s.cpp:7: initalizing non-const `const char *&' with `char *' will use a
s.cpp:2: in passing argument 1 of `f(const char *&)'

The author should have declared s to be const.  The compiler says it will
use a temporary variable to work around this.  The compiler doesn't.

Const issues didn't use to be fatal error.  Message says it isn't a fatal
error.  Now in potato it is a fatal error.  Smells fishy.  Anyone?  

More common const mistakes also have become fatal errors, but I used this
one since it gives a error message making it clear the compiler, on some
level, understands it is not suppose to be a fatal error.


Reply to: