Advertisement

Difrend compilers ????

Started by May 12, 2002 02:51 PM
2 comments, last by Vash the Stampede 22 years, 9 months ago
How can a compiler be diffrend ?? it''s the same C++ language ?? ???<>??? "on same OS"
The language is the same, but different compilers can
1. Generate different machine code
2. Have different obj/lib file formats
3. Have different C runtimes (compiler-specific functions)
4. Generate different supporting information (ie, Edit-And-Compile in MSVC)
etc.
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
The language being parsed (front-end) may be the same in theory, but in practice, compilers often differ, not complying the standard.
Plus the C++ language itself has evolved, vendors offer extensions.
Currently, only EDG officially offers a fully compliant C++ front-end (used in the Comeau compiler).

Then you have the back-end to consider : not only the target architecture (Mac, x86 (all the variants), Alpha, Mips ...) which all have different instruction sets, but also different operating systems, which offer different libraries. Nothing in the C++ standard enforces the way compilers have to implement language features at the binary level (well, that''s not quite true), and compilers therefore wildly differ (different ABI).
Plus back-ends may optimise code differently... and vendors strive to produce the best possible code.

If either the front or the back end differ, you have a different compiler.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
thanks for the info i know enough ..... now

This topic is closed to new replies.

Advertisement