295 #define EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS // The compiler compiles this OK, but executes it wrong. Fixed in VC7.0
296 #define EA_COMPILER_NO_VOID_RETURNS // The compiler fails to compile such cases. Fixed in VC7.0
297 #define EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE // The compiler fails to compile such cases. Fixed in VC7.0
298 #define EA_COMPILER_NO_DEDUCED_TYPENAME // The compiler fails to compile such cases. Fixed in VC7.0
299 #define EA_COMPILER_NO_STATIC_CONSTANTS // The compiler fails to compile such cases. Fixed in VC7.0
300 #define EA_COMPILER_NO_COVARIANT_RETURN_TYPE // The compiler fails to compile such cases. Fixed in VC7.1
301 #define EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP // The compiler compiles this OK, but executes it wrong. Fixed in VC7.1
302 #define EA_COMPILER_NO_TEMPLATE_TEMPLATES // The compiler fails to compile such cases. Fixed in VC7.1
303 #define EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION // The compiler fails to compile such cases. Fixed in VC7.1
304 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS // The compiler fails to compile such cases. Fixed in VC7.1
305//#define EA_COMPILER_NO_MEMBER_TEMPLATES // VC6.x supports member templates properly 95% of the time. So do we flag the remaining 5%?
306//#define EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION // VC6.x supports member templates properly 95% of the time. So do we flag the remaining 5%?
307
308 #elif (_MSC_VER <= 1300) // If VC7.0 and earlier...
309 #define EA_COMPILER_MSVC7
310
311 #define EA_COMPILER_NO_COVARIANT_RETURN_TYPE // The compiler fails to compile such cases. Fixed in VC7.1
312 #define EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP // The compiler compiles this OK, but executes it wrong. Fixed in VC7.1
313 #define EA_COMPILER_NO_TEMPLATE_TEMPLATES // The compiler fails to compile such cases. Fixed in VC7.1
314 #define EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION // The compiler fails to compile such cases. Fixed in VC7.1
315 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS // The compiler fails to compile such cases. Fixed in VC7.1
316 #define EA_COMPILER_NO_MEMBER_FUNCTION_SPECIALIZATION // This is the case only for VC7.0 and not VC6 or VC7.1+. Fixed in VC7.1
317//#define EA_COMPILER_NO_MEMBER_TEMPLATES // VC7.0 supports member templates properly 95% of the time. So do we flag the remaining 5%?
318
319 #elif (_MSC_VER < 1400) // If VC7.1 ...
320// The VC7.1 and later compiler is fairly close to the C++ standard
321// and thus has no compiler limitations that we are concerned about.
322 #define EA_COMPILER_MSVC7_2003
323 #define EA_COMPILER_MSVC7_1
324
325 #else // _MSC_VER of 1400 means VC8 (VS2005), 1500 means VC9 (VS2008)
326 #define EA_COMPILER_MSVC8_2005
327 #define EA_COMPILER_MSVC8_0
328
329 #endif
330
331
332// IBM
333 #elif defined(__xlC__)
334 #define EA_COMPILER_IBM
335 #define EA_COMPILER_NAME "IBM XL C"
336 #define EA_COMPILER_VERSION __xlC__
337 #define EA_COMPILER_STRING "IBM XL C compiler, version " INTERNAL_STRINGIZE( __xlC__ )
338
339
340// ARM compiler
341 #if defined(__ARMCC_VERSION)
342// Note that this refers to the ARM compiler (armcc or armcpp), but there
343// are other compilers that target ARM processors, such as GCC and Microsoft VC++.
344// If you want to detect compiling for the ARM processor, check for EA_PROCESSOR_ARM
345// being defined.
346 #define EA_COMPILER_ARM
347 #define EA_COMPILER_VERSION __ARMCC_VERSION
348 #define EA_COMPILER_NAME __CC_ARM
349//#define EA_COMPILER_STRING (defined below)
350
351 #endif
352
353
354// Unknown
355 #else // Else the compiler is unknown
356
357 #define EA_COMPILER_VERSION 0
358 #define EA_COMPILER_NAME "Unknown"
359
360 #endif
361
362 #ifndef EA_COMPILER_STRING
363 #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE(EA_COMPILER_VERSION)
364 #endif
365
366
367// Deprecated definitions
368// For backwards compatibility, should be supported for at least the life of EABase v2.0.x.