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

Discussion in 'C++' started by Matthieu Gallien, Jan 20, 2005.

  1. 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
     
    Matthieu Gallien, Jan 20, 2005
    #1
    1. Advertisements

  2. Matthieu Gallien

    matthias_k Guest

    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.
     
    matthias_k, Jan 20, 2005
    #2
    1. Advertisements

  3. Matthieu Gallien

    Sharad Kala Guest

    Twelve years is like ages for a C++ program :)
    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
     
    Sharad Kala, Jan 20, 2005
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.