Board index » cppbuilder » BCB2006: -Oi (Intrinsic optimization) fails with strcmp()
Andreas Hausladen
![]() CBuilder Developer |
BCB2006: -Oi (Intrinsic optimization) fails with strcmp()2005-12-22 03:03:43 AM cppbuilder22 If I use -Oi (which is automatically activated by -O2) the strcmp() function fails with Error E2015 - Ambigiousity between 'cdecl __strcmp__(const char *,const char *)' and 'cdecl std::__strcmp__(const char *,const char * )' in function int mystrcmp(const char *str1, const char *str2) int mystrcmp(const char *str1, const char *str2) { return (str1 && str2) ? strcmp(str1, str2) : (str1 ? 1 : (str2 ? -1 : 0)); } But if I use -O1 or no optimization at all (debug mode) the file compiles without errors. I have already seen that in Debug mode (no optimization) the PCH creation works but in Release mode (optimizations active) it always aborts PCH creation with "Code in header" that is found in _str.h. And guess what function: strcmp(). I'll see if I can create a reduces to the minimum testcase. -- Regards, Andreas Hausladen |