Re: gcc3.3.3 vs gcc4.0.0

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

 



jayashree.nair@xxxxxxxxxxxxx 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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux