9.20 Use a different compiler


9.20 Use a different compiler

9.20.1 Basic tactic

Compile your source code with a compiler from a different vendor.

9.20.2 Purpose

Resolve problems using a new revision of same compiler or problems understanding what the current compiler is complaining about.

9.20.3 Questions answered

  • What interpretations of the language standard are made by the compiler you’re using that aren’t made by all compilers?

  • What potential problems in your code aren’t being found by the compiler you’re using?

  • What implementation details of your current compiler are you relying on?

9.20.4 Potential problems

On a new or unique platform, there may be only one compiler available.

9.20.5 Refined tactics

None.

9.20.6 Related tactics

Try compiling and running the application on a computer system with a different operating system or hardware architecture.

9.20.7 Choosing tactics

Use this tactic when one of the following conditions is true:

  • Your program uses features that are new or poorly defined in the language standard or the reference manual supplied by the vendor.

  • You’re using an optimizing compiler.

9.20.8 Language specifics

  • C++: GNU g++ is a good alternative to commercial compilers for this purpose.

  • Java: Make sure the compiler is really different. Many vendors provide Sun’s compiler as their own. The experimental Jikes compiler from IBM is a good alternative.

  • C: GNU gcc is a good alternative to commercial compilers for this purpose.

  • Fortran: There aren’t a lot of alternative compilers on a given platform.




Debugging by Thinking. A Multidisciplinary Approach
Debugging by Thinking: A Multidisciplinary Approach (HP Technologies)
ISBN: 1555583075
EAN: 2147483647
Year: 2002
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net