Subj : Using predefined macro (__BORLANDC__) To : borland.public.cpp.borlandcpp From : Ofer Gaatone Date : Sun Feb 08 2004 12:05 pm Hi, i have an application written in pure C using Borland C++ 5.02. When changing to C++ Builder 6 i had to do slight changes. For the time being i want to have the possibility to compile the code using both compilers. I tried to use the predefined macro __BORLANDC__ to distinguish which compiler is used. In the code i wrote: if (__BORLANDC__ == 0x500) // tried also 0x502 { ver 5.02 } else { c++ builder } In the help of ver 5.02 it was written that __BORLANDC__ return 0x500. Trying to use it in my code i got warning "Unreachable code" for the code of ver 5.02 !! . Did i used the macro correctly ? if yes, why i got this warning, if not how it should be used ? A small example will be great. Thanks Ofer .