Re: How to tell which compiler in C code?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If the compiler build number is different between eVC++ and WCE you can use
the predefined macros:
_MSC_BUILD, _MSC_FULL_VER, but it is not very safe since compilers can be
updated.
According to your code snippet you will use CEPC/PB or iPaq/eVC++: in this
case it is better
if you test the processor architecture
--

Luca Calligaris
www.eurotech.it


"WinCE Trier" <WinCETrier@xxxxxxxxxxxxxxxxxxxxxxxxx> ha scritto nel
messaggio news:621F5BF0-2EE3-49CA-9753-29EDD528671F@xxxxxxxxxxxxxxxx
Our DLL will be used both in EVC 4.0 and WINCE4.2, and we plan to add
different code according to the compiler. So we need to know how to tell
which compiler in C code? Is there any predefined things to indicate this?

#if defined(XXXXX)
/* do something here for CEPC in PB */
.........
#else
/* do alternate here for iPaq in EVC4 */
........
#endif



Thanks for any suggestion!
Cetrier


.



Relevant Pages

  • Re: C-AUX / C and binary portability
    ... trigraphs, digraphs, and K&R declarations are, in many C compilers, currently at the level where they will cause compiler warnings. ... which is ambiguous, but in this case, it will just assume that the declaration was intended. ... the reason is that, if one does infact include headers and expand macros here, then the generated code will depend on whatever macros/constants/... ...
    (comp.lang.misc)
  • Re: Reflections on a classic Lisp Paper
    ... lisp dialects. ... user-defined special forms - Macros, Fexprs, and Nlambda. ... compilable because the compiler just couldn't do it. ...
    (comp.lang.lisp)
  • Re: Cpp Considered Harmful
    ... > However, in either case, assertions are invaluable in making certain ... because we now have our own cpp ... > macros, we can use several different compilers and have our system ... > built into the compiler. ...
    (comp.lang.cpp)
  • Re: Comparision of C Sharp and C performance
    ... You appear to be confusing C macros with conditional compilation. ... They are preprocessor directives. ... compiler permission to do constant folding in a visible way up front ...
    (comp.lang.c)
  • Re: Doing mini-languages in CL
    ... > Thats it in a nutshell. ... I think the detail to note is that the Macro facility is a Compiler ... simply put you may well be able to leverage CL macros in building your ...
    (comp.lang.lisp)