Quote:
Originally Posted by padadhic
We have a big proprietary project. Our code was compiling very properly with gcc 3.3.4 but not with 4.1.2.
|
The simplest approach (if you don't intend to fix the non-conformant code) is to stick with the older version 3.3 gcc. Many distros still have it in their repositories. Once you install it, you may be able to just set it before building your project (assuming a typical
makefile):
Code:
export CC=/usr/bin/gcc-3.3
Quote:
is there any gcc/g++ compiler switch which can disable checking extra ISO confirmations and stick to our older ISO standards.
|
There are
several switches, depending on which ISO standard your code complies to, and depending on whether this is C or C++.
Quote:
how we can figure out what ISO standards are supported by which gcc/g++ versions
|
This has no simple answer, since standard support in compilers is something that improves over a number of versions. Both of the major standards (ANSI C99 and the ISO C++98 standard) predated version 3.3 of gcc. However, version 3.4 of gcc did significantly improve support for the ISO C++98 standard, and 4.3 onwards is preparing for the upcoming ISO C++0x standard. You would need to refer to the
release notes for more detail.
It is likely that some of your errors are not caused because of a newer ISO standard, but because the compiler is better at checking for conformance.