|
Sierra Toolkit
Version of the Day
|
00001 /* 00002 Copyright (C) 2009 Electronic Arts, Inc. All rights reserved. 00003 00004 Redistribution and use in source and binary forms, with or without 00005 modification, are permitted provided that the following conditions 00006 are met: 00007 00008 1. Redistributions of source code must retain the above copyright 00009 notice, this list of conditions and the following disclaimer. 00010 2. Redistributions in binary form must reproduce the above copyright 00011 notice, this list of conditions and the following disclaimer in the 00012 documentation and/or other materials provided with the distribution. 00013 3. Neither the name of Electronic Arts, Inc. ("EA") nor the names of 00014 its contributors may be used to endorse or promote products derived 00015 from this software without specific prior written permission. 00016 00017 THIS SOFTWARE IS PROVIDED BY ELECTRONIC ARTS AND ITS CONTRIBUTORS "AS IS" AND ANY 00018 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00019 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00020 DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS OR ITS CONTRIBUTORS BE LIABLE FOR ANY 00021 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00022 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00023 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00024 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00025 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00026 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 */ 00028 00029 /*----------------------------------------------------------------------------- 00030 * config/eacompiler.h 00031 * 00032 * Copyright (c) 2002 - 2005 Electronic Arts Inc. All rights reserved. 00033 * Maintained by Paul Pedriana, Maxis 00034 * 00035 *----------------------------------------------------------------------------- 00036 * Currently supported defines include: 00037 * EA_COMPILER_GNUC 00038 * EA_COMPILER_ARM 00039 * EA_COMPILER_EDG 00040 * EA_COMPILER_SN 00041 * EA_COMPILER_MSVC 00042 * EA_COMPILER_METROWERKS 00043 * EA_COMPILER_INTEL 00044 * EA_COMPILER_BORLANDC 00045 * EA_COMPILER_IBM 00046 * 00047 * EA_COMPILER_VERSION = <integer> 00048 * EA_COMPILER_NAME = <string> 00049 * EA_COMPILER_STRING = <string> 00050 * 00051 * EA_COMPILER_NO_STATIC_CONSTANTS 00052 * EA_COMPILER_NO_TEMPLATE_SPECIALIZATION 00053 * EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION 00054 * EA_COMPILER_NO_MEMBER_TEMPLATES 00055 * EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION 00056 * EA_COMPILER_NO_TEMPLATE_TEMPLATES 00057 * EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS 00058 * EA_COMPILER_NO_VOID_RETURNS 00059 * EA_COMPILER_NO_COVARIANT_RETURN_TYPE 00060 * EA_COMPILER_NO_DEDUCED_TYPENAME 00061 * EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP 00062 * EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE 00063 * EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS 00064 * EA_COMPILER_NO_RTTI 00065 * EA_COMPILER_NO_EXCEPTIONS 00066 * EA_COMPILER_NO_UNWIND 00067 * EA_COMPILER_NO_STANDARD_CPP_LIBRARY 00068 * EA_COMPILER_NO_STATIC_VARIABLE_INIT 00069 * EA_COMPILER_NO_STATIC_FUNCTION_INIT 00070 * 00071 *----------------------------------------------------------------------------- 00072 * 00073 * Documentation 00074 * EA_COMPILER_NO_STATIC_CONSTANTS 00075 * Code such as this is legal, but some compilers fail to compile it: 00076 * struct A{ static const a = 1; }; 00077 * 00078 * EA_COMPILER_NO_TEMPLATE_SPECIALIZATION 00079 * Some compilers fail to allow template specialization, such as with this: 00080 * template<class U> void DoSomething(U u); 00081 * void DoSomething(int x); 00082 * 00083 * EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION 00084 * Some compilers fail to allow partial template specialization, such as with this: 00085 * template <class T, class Allocator> class vector{ }; // Primary templated class. 00086 * template <class Allocator> class vector<bool, Allocator>{ }; // Partially specialized version. 00087 * 00088 * EA_COMPILER_NO_MEMBER_TEMPLATES 00089 * Some compilers fail to allow member template functions such as this: 00090 * struct A{ template<class U> void DoSomething(U u); }; 00091 * 00092 * EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION 00093 * Some compilers fail to allow member template specialization, such as with this: 00094 * struct A{ 00095 * template<class U> void DoSomething(U u); 00096 * void DoSomething(int x); 00097 * }; 00098 * 00099 * EA_COMPILER_NO_TEMPLATE_TEMPLATES 00100 * Code such as this is legal: 00101 * template<typename T, template<typename> class U> 00102 * U<T> SomeFunction(const U<T> x) { return x.DoSomething(); } 00103 * 00104 * EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS 00105 * Some compilers fail to compile templated friends, as with this: 00106 * struct A{ template<class U> friend class SomeFriend; }; 00107 * This is described in the C++ Standard at 14.5.3. 00108 * 00109 * EA_COMPILER_NO_VOID_RETURNS 00110 * This is legal C++: 00111 * void DoNothing1(){ }; 00112 * void DoNothing2(){ return DoNothing1(); } 00113 * 00114 * EA_COMPILER_NO_COVARIANT_RETURN_TYPE 00115 * See the C++ standard sec 10.3,p5. 00116 * 00117 * EA_COMPILER_NO_DEDUCED_TYPENAME 00118 * Some compilers don't support the use of 'typename' for 00119 * dependent types in deduced contexts, as with this: 00120 * template <class T> void Function(T, typename T::type); 00121 * 00122 * EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP 00123 * Also known as Koenig lookup. Basically, if you have a function 00124 * that is a namespace and you call that function without prefixing 00125 * it with the namespace the compiler should look at any arguments 00126 * you pass to that function call and search their namespace *first* 00127 * to see if the given function exists there. 00128 * 00129 * EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE 00130 * <exception> is in namespace std. Some std libraries fail to 00131 * put the contents of <exception> in namespace std. The following 00132 * code should normally be legal: 00133 * void Function(){ std::terminate(); } 00134 * 00135 * EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS 00136 * Some compilers fail to execute DoSomething() properly, though they 00137 * succeed in compiling it, as with this: 00138 * template <int i> 00139 * bool DoSomething(int j){ return i == j; }; 00140 * DoSomething<1>(2); 00141 * 00142 * EA_COMPILER_NO_EXCEPTIONS 00143 * The compiler is configured to disallow the use of try/throw/catch 00144 * syntax (often to improve performance). Use of such syntax in this 00145 * case will cause a compilation error. 00146 * 00147 * EA_COMPILER_NO_UNWIND 00148 * The compiler is configured to allow the use of try/throw/catch 00149 * syntax and behaviour but disables the generation of stack unwinding 00150 * code for responding to exceptions (often to improve performance). 00151 * 00152 *---------------------------------------------------------------------------*/ 00153 00154 #ifndef INCLUDED_eacompiler_H 00155 #define INCLUDED_eacompiler_H 00156 00157 #ifndef INCLUDED_eaplatform_H 00158 #include <stk_util/util/eaplatform_eastl.h> 00159 #endif 00160 00161 // Note: This is used to generate the EA_COMPILER_STRING macros 00162 #ifndef INTERNAL_STRINGIZE 00163 #define INTERNAL_STRINGIZE(x) INTERNAL_PRIMITIVE_STRINGIZE(x) 00164 #endif 00165 #ifndef INTERNAL_PRIMITIVE_STRINGIZE 00166 #define INTERNAL_PRIMITIVE_STRINGIZE(x) #x 00167 #endif 00168 00169 00170 // EDG (EDG compiler front-end, used by other compilers such as SN) 00171 #if defined(__EDG_VERSION__) 00172 #define EA_COMPILER_EDG 00173 #endif 00174 00175 00176 // SN 00177 #if defined(__SNC__) // SN Systems compiler 00178 // Note that there are two versions of the SN compiler, one that is 00179 // GNUC-based and a newer one which is based on an EDG (Edison Design 00180 // Group) front-end with a back-end code generator made by SN. 00181 // The EDG-based SN compiler uses "GCC compatibility mode" and thus 00182 // defines __GNUC__ but isn't really GNUC. Also, as of this writing 00183 // it appears that the SN compiler may arrive with MSVC-compatibility 00184 // mode in addition as well. Thus, we define EA_COMPILER_SN 00185 // separately from other EA_COMPILER defines it is possible that both 00186 // may be defined at the same time. Note that while the newer EDG-based 00187 // SN compiler may emulate other compilers, it doesn't act exactly 00188 // the same. 00189 #define EA_COMPILER_SN 00190 #endif 00191 00192 00193 // Airplay SDK (third party mobile middleware compiler) 00194 #if defined(__S3E__) 00195 #define EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE 00196 #endif 00197 00198 00199 // SNC (SN Systems) 00200 #if defined(__SNC__) 00201 #define EA_COMPILER_NAME "SNC" 00202 00203 #ifdef __GNUC__ // If SN is using GCC-compatibility mode (which it usually is)... 00204 #define EA_COMPILER_GNUC 00205 #define EA_COMPILER_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) // We intentionally report the GCC version here. SN 00206 #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, GCC version " INTERNAL_STRINGIZE( __GNUC__ ) "." INTERNAL_STRINGIZE( __GNUC_MINOR__ ) ", SNC version " INTERNAL_STRINGIZE( __SN_VER__ ) ", EDG version " INTERNAL_STRINGIZE( __EDG_VERSION__ ) 00207 #else 00208 #define EA_COMPILER_VERSION __SN_VER__ 00209 #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE( EA_COMPILER_VERSION ) ", EDG version " INTERNAL_STRINGIZE( __EDG_VERSION__ ) 00210 #endif 00211 00212 // GCC (a.k.a. GNUC) 00213 #elif defined(__GNUC__) // GCC compilers exist for many platforms. 00214 #define EA_COMPILER_GNUC 00215 #define EA_COMPILER_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) 00216 #define EA_COMPILER_NAME "GCC" 00217 #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE( __GNUC__ ) "." INTERNAL_STRINGIZE( __GNUC_MINOR__ ) 00218 00219 #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) // If GCC < 2.95... 00220 #define EA_COMPILER_NO_MEMBER_TEMPLATES 00221 #endif 00222 #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 97) // If GCC <= 2.97... 00223 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS 00224 #endif 00225 #if (__GNUC__ == 3) && ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) // If GCC 3.1 or 3.2 (but not pre 3.1 or post 3.2)... 00226 #define EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS 00227 #endif 00228 00229 // Borland C++ 00230 #elif defined(__BORLANDC__) 00231 #define EA_COMPILER_BORLANDC 00232 #define EA_COMPILER_VERSION __BORLANDC__ 00233 #define EA_COMPILER_NAME "Borland C" 00234 //#define EA_COMPILER_STRING (defined below) 00235 00236 #if (__BORLANDC__ <= 0x0550) // If Borland C++ Builder 4 and 5... 00237 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS 00238 #endif 00239 #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ < 0x600) 00240 #define EA_COMPILER_NO_MEMBER_FUNCTION_SPECIALIZATION 00241 #endif 00242 00243 00244 // Intel C++ (via EDG front-end) 00245 #elif defined(__ICL) || defined(__ICC) 00246 #define EA_COMPILER_INTEL 00247 #if defined(__ICL) 00248 #define EA_COMPILER_VERSION __ICL 00249 #elif defined(__ICC) 00250 #define EA_COMPILER_VERSION __ICC 00251 #endif 00252 #define EA_COMPILER_NAME "Intel C++" 00253 //#define EA_COMPILER_STRING (defined below) 00254 00255 // Intel is based ont the EDG (Edison Design Group) front end and 00256 // all recent versions are very compliant to the C++ standard. 00257 00258 00259 // Metrowerks 00260 #elif defined(__MWERKS__) || defined(__CWCC__) // Metrowerks compilers exist for many platforms. 00261 #define EA_COMPILER_METROWERKS 00262 #ifdef __MWERKS__ 00263 #define EA_COMPILER_VERSION __MWERKS__ 00264 #else 00265 #define EA_COMPILER_VERSION __CWCC__ 00266 #endif 00267 #define EA_COMPILER_NAME "Metrowerks" 00268 //#define EA_COMPILER_STRING (defined below) 00269 00270 #if (__MWERKS__ <= 0x2407) // If less than v7.x... 00271 #define EA_COMPILER_NO_MEMBER_FUNCTION_SPECIALIZATION 00272 #endif 00273 #if (__MWERKS__ <= 0x3003) // If less than v8.x... 00274 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS 00275 #endif 00276 00277 00278 // Microsoft VC++ 00279 #elif defined(_MSC_VER) && !(defined(__S3E__) && defined(__arm__)) // S3E is a mobile SDK which mistakenly masquerades as VC++ on ARM. 00280 #define EA_COMPILER_MSVC 00281 #define EA_COMPILER_VERSION _MSC_VER 00282 #define EA_COMPILER_NAME "Microsoft Visual C++" 00283 //#define EA_COMPILER_STRING (defined below) 00284 00285 #if (_MSC_VER <= 1200) // If VC6.x and earlier... 00286 #if (_MSC_VER < 1200) 00287 #define EA_COMPILER_MSVCOLD 00288 #else 00289 #define EA_COMPILER_MSVC6 00290 #endif 00291 00292 #if (_MSC_VER < 1200) // If VC5.x or earlier... 00293 #define EA_COMPILER_NO_TEMPLATE_SPECIALIZATION 00294 #endif 00295 #define EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS // The compiler compiles this OK, but executes it wrong. Fixed in VC7.0 00296 #define EA_COMPILER_NO_VOID_RETURNS // The compiler fails to compile such cases. Fixed in VC7.0 00297 #define EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE // The compiler fails to compile such cases. Fixed in VC7.0 00298 #define EA_COMPILER_NO_DEDUCED_TYPENAME // The compiler fails to compile such cases. Fixed in VC7.0 00299 #define EA_COMPILER_NO_STATIC_CONSTANTS // The compiler fails to compile such cases. Fixed in VC7.0 00300 #define EA_COMPILER_NO_COVARIANT_RETURN_TYPE // The compiler fails to compile such cases. Fixed in VC7.1 00301 #define EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP // The compiler compiles this OK, but executes it wrong. Fixed in VC7.1 00302 #define EA_COMPILER_NO_TEMPLATE_TEMPLATES // The compiler fails to compile such cases. Fixed in VC7.1 00303 #define EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION // The compiler fails to compile such cases. Fixed in VC7.1 00304 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS // The compiler fails to compile such cases. Fixed in VC7.1 00305 //#define EA_COMPILER_NO_MEMBER_TEMPLATES // VC6.x supports member templates properly 95% of the time. So do we flag the remaining 5%? 00306 //#define EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION // VC6.x supports member templates properly 95% of the time. So do we flag the remaining 5%? 00307 00308 #elif (_MSC_VER <= 1300) // If VC7.0 and earlier... 00309 #define EA_COMPILER_MSVC7 00310 00311 #define EA_COMPILER_NO_COVARIANT_RETURN_TYPE // The compiler fails to compile such cases. Fixed in VC7.1 00312 #define EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP // The compiler compiles this OK, but executes it wrong. Fixed in VC7.1 00313 #define EA_COMPILER_NO_TEMPLATE_TEMPLATES // The compiler fails to compile such cases. Fixed in VC7.1 00314 #define EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION // The compiler fails to compile such cases. Fixed in VC7.1 00315 #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS // The compiler fails to compile such cases. Fixed in VC7.1 00316 #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 00317 //#define EA_COMPILER_NO_MEMBER_TEMPLATES // VC7.0 supports member templates properly 95% of the time. So do we flag the remaining 5%? 00318 00319 #elif (_MSC_VER < 1400) // If VC7.1 ... 00320 // The VC7.1 and later compiler is fairly close to the C++ standard 00321 // and thus has no compiler limitations that we are concerned about. 00322 #define EA_COMPILER_MSVC7_2003 00323 #define EA_COMPILER_MSVC7_1 00324 00325 #else // _MSC_VER of 1400 means VC8 (VS2005), 1500 means VC9 (VS2008) 00326 #define EA_COMPILER_MSVC8_2005 00327 #define EA_COMPILER_MSVC8_0 00328 00329 #endif 00330 00331 00332 // IBM 00333 #elif defined(__xlC__) 00334 #define EA_COMPILER_IBM 00335 #define EA_COMPILER_NAME "IBM XL C" 00336 #define EA_COMPILER_VERSION __xlC__ 00337 #define EA_COMPILER_STRING "IBM XL C compiler, version " INTERNAL_STRINGIZE( __xlC__ ) 00338 00339 00340 // ARM compiler 00341 #if defined(__ARMCC_VERSION) 00342 // Note that this refers to the ARM compiler (armcc or armcpp), but there 00343 // are other compilers that target ARM processors, such as GCC and Microsoft VC++. 00344 // If you want to detect compiling for the ARM processor, check for EA_PROCESSOR_ARM 00345 // being defined. 00346 #define EA_COMPILER_ARM 00347 #define EA_COMPILER_VERSION __ARMCC_VERSION 00348 #define EA_COMPILER_NAME __CC_ARM 00349 //#define EA_COMPILER_STRING (defined below) 00350 00351 #endif 00352 00353 00354 // Unknown 00355 #else // Else the compiler is unknown 00356 00357 #define EA_COMPILER_VERSION 0 00358 #define EA_COMPILER_NAME "Unknown" 00359 00360 #endif 00361 00362 #ifndef EA_COMPILER_STRING 00363 #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE(EA_COMPILER_VERSION) 00364 #endif 00365 00366 00367 // Deprecated definitions 00368 // For backwards compatibility, should be supported for at least the life of EABase v2.0.x. 00369 #ifndef EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION 00370 #define EA_COMPILER_PARTIAL_TEMPLATE_SPECIALIZATION 00371 #endif 00372 #ifndef EA_COMPILER_NO_TEMPLATE_SPECIALIZATION 00373 #define EA_COMPILER_TEMPLATE_SPECIALIZATION 00374 #endif 00375 #ifndef EA_COMPILER_NO_MEMBER_TEMPLATES 00376 #define EA_COMPILER_MEMBER_TEMPLATES 00377 #endif 00378 #ifndef EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION 00379 #define EA_COMPILER_MEMBER_TEMPLATE_SPECIALIZATION 00380 #endif 00381 00382 00383 00384 // EA_COMPILER_NO_RTTI 00385 // 00386 // If EA_COMPILER_NO_RTTI is defined, then RTTI (run-time type information) 00387 // is not available (possibly due to being disabled by the user). 00388 // 00389 #if defined(__SNC__) && !defined(__RTTI) 00390 #define EA_COMPILER_NO_RTTI 00391 #elif defined(__GXX_ABI_VERSION) && !defined(__GXX_RTTI) 00392 #define EA_COMPILER_NO_RTTI 00393 #elif defined(_MSC_VER) && !defined(_CPPRTTI) 00394 #define EA_COMPILER_NO_RTTI 00395 #elif defined(__MWERKS__) 00396 #if !__option(RTTI) 00397 #define EA_COMPILER_NO_RTTI 00398 #endif 00399 #endif 00400 00401 00402 00403 // EA_COMPILER_NO_EXCEPTIONS / EA_COMPILER_NO_UNWIND 00404 // 00405 // If EA_COMPILER_NO_EXCEPTIONS is defined, then the compiler is 00406 // configured to not recognize C++ exception-handling statements 00407 // such as try/catch/throw. Thus, when EA_COMPILER_NO_EXCEPTIONS is 00408 // defined, code that attempts to use exception handling statements 00409 // will usually cause a compilation error. If is often desirable 00410 // for projects to disable exception handling because exception 00411 // handling causes extra code and/or data generation which might 00412 // not be needed, especially if it is known that exceptions won't 00413 // be happening. When writing code that is to be portable between 00414 // systems of which some enable exception handling while others 00415 // don't, check for EA_COMPILER_NO_EXCEPTIONS being defined. 00416 // 00417 #if defined(EA_COMPILER_GNUC) && defined(_NO_EX) // GCC on some platforms (e.g. PS3) defines _NO_EX when exceptions are disabled. 00418 #define EA_COMPILER_NO_EXCEPTIONS 00419 00420 #elif (defined(EA_COMPILER_GNUC) || defined(EA_COMPILER_INTEL) || defined(EA_COMPILER_SN)) && !defined(__EXCEPTIONS) // GCC and most EDG-based compilers define __EXCEPTIONS when exception handling is enabled. 00421 #define EA_COMPILER_NO_EXCEPTIONS 00422 00423 #elif defined(EA_COMPILER_METROWERKS) 00424 #if !__option(exceptions) 00425 #define EA_COMPILER_NO_EXCEPTIONS 00426 #endif 00427 00428 // Borland and Micrsoft use the _CPUUNWIND define to denote that 00429 // exception stack unwinding code generation is disabled. The result 00430 // is that you can call try/catch/throw and that exceptions will be 00431 // caught handled, but that no automatic object destruction will 00432 // happen between a throw and the resulting catch. We thus don't 00433 // want to define EA_COMPILER_NO_EXCEPTIONS, but perhaps users might 00434 // be interesting in knowing that unwinding is disabled. 00435 #elif (defined(EA_COMPILER_BORLAND) || defined(EA_COMPILER_MSVC)) && !defined(_CPPUNWIND) 00436 #define EA_COMPILER_NO_UNWIND 00437 00438 #endif // EA_COMPILER_NO_EXCEPTIONS / EA_COMPILER_NO_UNWIND 00439 00440 00441 00442 // EA_COMPILER_NO_STANDARD_CPP_LIBRARY 00443 // 00444 // If defined, then the compiler doesn't provide a Standard C++ library. 00445 // 00446 #if defined(EA_PLATFORM_ANDROID) 00447 #define EA_COMPILER_NO_STANDARD_CPP_LIBRARY 00448 #endif 00449 00450 00451 // EA_COMPILER_NO_STATIC_VARIABLE_INIT 00452 // 00453 // If defined, it means that global or static C++ variables will be 00454 // constructed. Not all compiler/platorm combinations support this. 00455 // User code that needs to be portable must avoid having C++ variables 00456 // that construct before main. 00457 // 00458 //#if defined(EA_PLATFORM_MOBILE) 00459 // #define EA_COMPILER_NO_STATIC_VARIABLE_INIT 00460 //#endif 00461 00462 00463 00464 // EA_COMPILER_NO_STATIC_FUNCTION_INIT 00465 // 00466 // If defined, it means that functions marked as startup functions 00467 // (e.g. __attribute__((constructor)) in GCC) are supported. It may 00468 // be that some compiler/platform combinations don't support this. 00469 // 00470 //#if defined(XXX) // So far, all compiler/platforms we use support this. 00471 // #define EA_COMPILER_NO_STATIC_VARIABLE_INIT 00472 //#endif 00473 00474 00475 00476 #endif // INCLUDED_eacompiler_H