gcc3.3.3 vs gcc4.0.0

Tim Prince timothyprince@sbcglobal.net
Fri Nov 24 14:56:00 GMT 2006

jayashree.nair@polaris.co.in wrote:
>  In one m/c with gcc3.3.3 installed, I have no problem in compiling and
> linking.
> In another m/c with gcc4.0.0 installed, I was getting the following error:
> p15.c:4857: error: conflicting types for 'logerror'
> p15.c:4812: error: previous implicit declaration of 'logerror' was here
> logerror() was not declared in the p15.pc file.
> So I changed the code and declared the method before my main routine and it
> solved my problem.
> What  I would like to know is that why is this giving me such different
> results with the different versions.

Recent gcc versions have become much more thorough about checking for 
these errors, which might or might not have generated visible problems 
if ignored.  It looks like the policy has changed from passing over it, 
if the compiler can't tell whether legacy code is a problem, to 
strictness under the same conditions.
I have run into cases where legacy code fails inscrutably on Windows, 
and the new gcc error checking pointed out the problem.

More information about the Gcc-help mailing list