This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ (2.95.X) STRANGE BEHAVIOUR


First, check to see if -Werror is passed as a parameter to your build
string. This causes all warnings to be treated as errors so you can
only build warning-free code (not a bad policy). If previous gcc/g++
versions didn't generate any warnings then you wouldn't have seen this
behaviour until now. For your second problem, this appears to truly be
the case. For the kde build, I'm concerned that the select(...) may be
caused from the compiler not being able to find a valid declaration of
select that matches your parameters and this might be a valid break. 

	good luck,

		Ben Scherrey

PS: Reverting to 2.8.1 would certainly be a mistake in any case. The
2.9.x compiler complains more because its more correct, i.e. better.
Demand the higher standard! :-)

sysadm wrote:
> 
> I 've installed in several machines (different OS's)
> gcc-2.95.1. Trying to compile some pretty standard
> things in C++ like KDE-1.1.2 or Netscape's Mozilla M11
> I get warnings that gcc-2.7.x, 2.8.x may not output.
> Up to that point all are fine.
> The problem is that after these warnings the "make"
> command will STOP! as it was a real error. Have I
> missed something? Do I need some extra -fX options so
> that C++ (2.95.1) will continue to compile after
> these warnings ???  (see below)
> The above it doesnt happens with gcc 2.8.1 or 2.7.2.X
> Can it be that we have a new release of GCC that will
> not compile major chunks of free software???
> 
> EG:
> 
> C++ (c++ -2.95.1) ERRORS
> 
> =======================================================
> KDE-1.1.2 - LIBS
> 
> /bin/sh ../libtool --silent --mode=compile g++
> -DHAVE_CONFIG_H -I. -I. -I..
> -I/usr/kde//include -O2 -c fakes.cpp
> fakes.cpp: In function `void usleep(unsigned int)':
> fakes.cpp:71: implicit declaration of function `int
> select(...)'
> make[2]: *** [fakes.lo] Error 1
> =======================================================
> 
> This is just a warning with GNU gcc-2.8.1.
> The program however builds fine and works fine!
> Here compilation STOPS.
> 
> =======================================================
> MOZILLA (M11 - NEWEST TEST RELEASE)
> Module "xpcom" (but almost all the others also)
> 
> In file:
> nsFileSpecUnix.cpp: In function `static void
> nsFileSpecHelpers::Canonify(nsSimpleCharString &,
> int)':
> 
> nsFileSpecUnix.cpp:92: warning: choosing
> `nsSimpleCharString::operator char *()' over
> `nsSimpleCharString::operator const char *() const'
> nsFileSpecUnix.cpp:92: warning:   for conversion from
> `nsSimpleCharString' to `const char *'
> nsFileSpecUnix.cpp:92: warning:   because conversion
> sequence for the argument is better
> 
> nsFileSpecUnix.cpp:105: warning: choosing
> `nsSimpleCharString::operator char *()' over
> `nsSimpleCharString::operator const char *() const'
> nsFileSpecUnix.cpp:105: warning:   for conversion from
> `nsSimpleCharString' to `const char *'
> nsFileSpecUnix.cpp:105: warning:   because conversion
> sequence for the argument is better
> 
> nsFileSpecUnix.cpp: In method `nsresult
> nsFileSpec::ResolveSymlink(PRBool &)':
> nsFileSpecUnix.cpp:208: warning: choosing
> `nsSimpleCharString::operator char *()' over
> `nsSimpleCharString::operator const char *() const'
> nsFileSpecUnix.cpp:208: warning:   for conversion from
> `nsSimpleCharString' to `const char *'
> nsFileSpecUnix.cpp:208: warning:   because conversion
> sequence for the argument is better
> 
> make[2]: *** [nsFileSpec.o] Error 1
> 
> =======================================================
> 
> I looked this code and I don't know why it finds it
> so bad that has to STOP and produce an error.
> Netscape lists as development tool "egcs" 1.0.3 and
> on.
> Can gcc-2.95.1 (c++) be so different from egcs?
> So that egce will compile M11 but 2.95.X will NOT?
> 
> I am about to revert to gcc-2.8.1 .
> Any suggestions from the C++ gurus will be greatly
> appreciated.
> 
> Regards,
> Alex
> 
> =====
> 
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]