how to check that my programe respects the iso c++

M

Matthieu Gallien

Hello
I maintain an old software that was developped since twelve years.
I need to check for the best portability and the best maintainability.
The idea is to write cleanest c++. So I want to check for the respect of
the iso c++ of my code which originaly don't respect it. (It was first
compile with gcc2.7.x)
I made some modifications, but I am not sure to have terminate my job.
Sorry for my poor english
 
M

matthias_k

Matthieu said:
Hello
I maintain an old software that was developped since twelve years.
I need to check for the best portability and the best maintainability.
The idea is to write cleanest c++. So I want to check for the respect of
the iso c++ of my code which originaly don't respect it. (It was first
compile with gcc2.7.x)
I made some modifications, but I am not sure to have terminate my job.
Sorry for my poor english

In g++, you can compile with the -std=c++98 flag set. This checks for
ISO-C++ ('98) conformance. However, I'm not sure if g++ itself is 100%
standard conformous. I think not. But it should do the job.
 
S

Sharad Kala

Matthieu Gallien said:
Hello
I maintain an old software that was developped since twelve years.

Twelve years is like ages for a C++ program :)
I need to check for the best portability and the best maintainability.
The idea is to write cleanest c++. So I want to check for the respect of
the iso c++ of my code which originaly don't respect it. (It was first
compile with gcc2.7.x)

Get yourself a modern compiler like g++ 3.4. Compiler your code with the
appropriate compiler options (-W -Wall -ansi -pedantic ...) You may get
dozens of errors, if you have not been keeping up with the pace of changes
in C++ then get a good introductory level C++ also. Accelerated C++ (Koenig
& Moo) is a good option for that.

HTH,
Sharad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top