Sierra Toolkit  Version of the Day
eacompiler_eastl.h
1 /*
2 Copyright (C) 2009 Electronic Arts, Inc. All rights reserved.
3 
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions
6 are met:
7 
8 1. Redistributions of source code must retain the above copyright
9  notice, this list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright
11  notice, this list of conditions and the following disclaimer in the
12  documentation and/or other materials provided with the distribution.
13 3. Neither the name of Electronic Arts, Inc. ("EA") nor the names of
14  its contributors may be used to endorse or promote products derived
15  from this software without specific prior written permission.
16 
17 THIS SOFTWARE IS PROVIDED BY ELECTRONIC ARTS AND ITS CONTRIBUTORS "AS IS" AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
29 /*-----------------------------------------------------------------------------
30  * config/eacompiler.h
31  *
32  * Copyright (c) 2002 - 2005 Electronic Arts Inc. All rights reserved.
33  * Maintained by Paul Pedriana, Maxis
34  *
35  *-----------------------------------------------------------------------------
36  * Currently supported defines include:
37  * EA_COMPILER_GNUC
38  * EA_COMPILER_ARM
39  * EA_COMPILER_EDG
40  * EA_COMPILER_SN
41  * EA_COMPILER_MSVC
42  * EA_COMPILER_METROWERKS
43  * EA_COMPILER_INTEL
44  * EA_COMPILER_BORLANDC
45  * EA_COMPILER_IBM
46  *
47  * EA_COMPILER_VERSION = <integer>
48  * EA_COMPILER_NAME = <string>
49  * EA_COMPILER_STRING = <string>
50  *
51  * EA_COMPILER_NO_STATIC_CONSTANTS
52  * EA_COMPILER_NO_TEMPLATE_SPECIALIZATION
53  * EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION
54  * EA_COMPILER_NO_MEMBER_TEMPLATES
55  * EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION
56  * EA_COMPILER_NO_TEMPLATE_TEMPLATES
57  * EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS
58  * EA_COMPILER_NO_VOID_RETURNS
59  * EA_COMPILER_NO_COVARIANT_RETURN_TYPE
60  * EA_COMPILER_NO_DEDUCED_TYPENAME
61  * EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP
62  * EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE
63  * EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
64  * EA_COMPILER_NO_RTTI
65  * EA_COMPILER_NO_EXCEPTIONS
66  * EA_COMPILER_NO_UNWIND
67  * EA_COMPILER_NO_STANDARD_CPP_LIBRARY
68  * EA_COMPILER_NO_STATIC_VARIABLE_INIT
69  * EA_COMPILER_NO_STATIC_FUNCTION_INIT
70  *
71  *-----------------------------------------------------------------------------
72  *
73  * Documentation
74  * EA_COMPILER_NO_STATIC_CONSTANTS
75  * Code such as this is legal, but some compilers fail to compile it:
76  * struct A{ static const a = 1; };
77  *
78  * EA_COMPILER_NO_TEMPLATE_SPECIALIZATION
79  * Some compilers fail to allow template specialization, such as with this:
80  * template<class U> void DoSomething(U u);
81  * void DoSomething(int x);
82  *
83  * EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION
84  * Some compilers fail to allow partial template specialization, such as with this:
85  * template <class T, class Allocator> class vector{ }; // Primary templated class.
86  * template <class Allocator> class vector<bool, Allocator>{ }; // Partially specialized version.
87  *
88  * EA_COMPILER_NO_MEMBER_TEMPLATES
89  * Some compilers fail to allow member template functions such as this:
90  * struct A{ template<class U> void DoSomething(U u); };
91  *
92  * EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION
93  * Some compilers fail to allow member template specialization, such as with this:
94  * struct A{
95  * template<class U> void DoSomething(U u);
96  * void DoSomething(int x);
97  * };
98  *
99  * EA_COMPILER_NO_TEMPLATE_TEMPLATES
100  * Code such as this is legal:
101  * template<typename T, template<typename> class U>
102  * U<T> SomeFunction(const U<T> x) { return x.DoSomething(); }
103  *
104  * EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS
105  * Some compilers fail to compile templated friends, as with this:
106  * struct A{ template<class U> friend class SomeFriend; };
107  * This is described in the C++ Standard at 14.5.3.
108  *
109  * EA_COMPILER_NO_VOID_RETURNS
110  * This is legal C++:
111  * void DoNothing1(){ };
112  * void DoNothing2(){ return DoNothing1(); }
113  *
114  * EA_COMPILER_NO_COVARIANT_RETURN_TYPE
115  * See the C++ standard sec 10.3,p5.
116  *
117  * EA_COMPILER_NO_DEDUCED_TYPENAME
118  * Some compilers don't support the use of 'typename' for
119  * dependent types in deduced contexts, as with this:
120  * template <class T> void Function(T, typename T::type);
121  *
122  * EA_COMPILER_NO_ARGUMENT_DEPENDENT_LOOKUP
123  * Also known as Koenig lookup. Basically, if you have a function
124  * that is a namespace and you call that function without prefixing
125  * it with the namespace the compiler should look at any arguments
126  * you pass to that function call and search their namespace *first*
127  * to see if the given function exists there.
128  *
129  * EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE
130  * <exception> is in namespace std. Some std libraries fail to
131  * put the contents of <exception> in namespace std. The following
132  * code should normally be legal:
133  * void Function(){ std::terminate(); }
134  *
135  * EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
136  * Some compilers fail to execute DoSomething() properly, though they
137  * succeed in compiling it, as with this:
138  * template <int i>
139  * bool DoSomething(int j){ return i == j; };
140  * DoSomething<1>(2);
141  *
142  * EA_COMPILER_NO_EXCEPTIONS
143  * The compiler is configured to disallow the use of try/throw/catch
144  * syntax (often to improve performance). Use of such syntax in this
145  * case will cause a compilation error.
146  *
147  * EA_COMPILER_NO_UNWIND
148  * The compiler is configured to allow the use of try/throw/catch
149  * syntax and behaviour but disables the generation of stack unwinding
150  * code for responding to exceptions (often to improve performance).
151  *
152  *---------------------------------------------------------------------------*/
153 
154 #ifndef INCLUDED_eacompiler_H
155 #define INCLUDED_eacompiler_H
156 
157  #ifndef INCLUDED_eaplatform_H
158  #include <stk_util/util/eaplatform_eastl.h>
159  #endif
160 
161  // Note: This is used to generate the EA_COMPILER_STRING macros
162  #ifndef INTERNAL_STRINGIZE
163  #define INTERNAL_STRINGIZE(x) INTERNAL_PRIMITIVE_STRINGIZE(x)
164  #endif
165  #ifndef INTERNAL_PRIMITIVE_STRINGIZE
166  #define INTERNAL_PRIMITIVE_STRINGIZE(x) #x
167  #endif
168 
169 
170  // EDG (EDG compiler front-end, used by other compilers such as SN)
171  #if defined(__EDG_VERSION__)
172  #define EA_COMPILER_EDG
173  #endif
174 
175 
176  // SN
177  #if defined(__SNC__) // SN Systems compiler
178  // Note that there are two versions of the SN compiler, one that is
179  // GNUC-based and a newer one which is based on an EDG (Edison Design
180  // Group) front-end with a back-end code generator made by SN.
181  // The EDG-based SN compiler uses "GCC compatibility mode" and thus
182  // defines __GNUC__ but isn't really GNUC. Also, as of this writing
183  // it appears that the SN compiler may arrive with MSVC-compatibility
184  // mode in addition as well. Thus, we define EA_COMPILER_SN
185  // separately from other EA_COMPILER defines it is possible that both
186  // may be defined at the same time. Note that while the newer EDG-based
187  // SN compiler may emulate other compilers, it doesn't act exactly
188  // the same.
189  #define EA_COMPILER_SN
190  #endif
191 
192 
193  // Airplay SDK (third party mobile middleware compiler)
194  #if defined(__S3E__)
195  #define EA_COMPILER_NO_EXCEPTION_STD_NAMESPACE
196  #endif
197 
198 
199  // SNC (SN Systems)
200  #if defined(__SNC__)
201  #define EA_COMPILER_NAME "SNC"
202 
203  #ifdef __GNUC__ // If SN is using GCC-compatibility mode (which it usually is)...
204  #define EA_COMPILER_GNUC
205  #define EA_COMPILER_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) // We intentionally report the GCC version here. SN
206  #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__ )
207  #else
208  #define EA_COMPILER_VERSION __SN_VER__
209  #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE( EA_COMPILER_VERSION ) ", EDG version " INTERNAL_STRINGIZE( __EDG_VERSION__ )
210  #endif
211 
212  // GCC (a.k.a. GNUC)
213  #elif defined(__GNUC__) // GCC compilers exist for many platforms.
214  #define EA_COMPILER_GNUC
215  #define EA_COMPILER_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
216  #define EA_COMPILER_NAME "GCC"
217  #define EA_COMPILER_STRING EA_COMPILER_NAME " compiler, version " INTERNAL_STRINGIZE( __GNUC__ ) "." INTERNAL_STRINGIZE( __GNUC_MINOR__ )
218 
219  #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) // If GCC < 2.95...
220  #define EA_COMPILER_NO_MEMBER_TEMPLATES
221  #endif
222  #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 97) // If GCC <= 2.97...
223  #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS
224  #endif
225  #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)...
226  #define EA_COMPILER_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
227  #endif
228 
229  // Borland C++
230  #elif defined(__BORLANDC__)
231  #define EA_COMPILER_BORLANDC
232  #define EA_COMPILER_VERSION __BORLANDC__
233  #define EA_COMPILER_NAME "Borland C"
234  //#define EA_COMPILER_STRING (defined below)
235 
236  #if (__BORLANDC__ <= 0x0550) // If Borland C++ Builder 4 and 5...
237  #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS
238  #endif
239  #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ < 0x600)
240  #define EA_COMPILER_NO_MEMBER_FUNCTION_SPECIALIZATION
241  #endif
242 
243 
244  // Intel C++ (via EDG front-end)
245  #elif defined(__ICL) || defined(__ICC)
246  #define EA_COMPILER_INTEL
247  #if defined(__ICL)
248  #define EA_COMPILER_VERSION __ICL
249  #elif defined(__ICC)
250  #define EA_COMPILER_VERSION __ICC
251  #endif
252  #define EA_COMPILER_NAME "Intel C++"
253  //#define EA_COMPILER_STRING (defined below)
254 
255  // Intel is based ont the EDG (Edison Design Group) front end and
256  // all recent versions are very compliant to the C++ standard.
257 
258 
259  // Metrowerks
260  #elif defined(__MWERKS__) || defined(__CWCC__) // Metrowerks compilers exist for many platforms.
261  #define EA_COMPILER_METROWERKS
262  #ifdef __MWERKS__
263  #define EA_COMPILER_VERSION __MWERKS__
264  #else
265  #define EA_COMPILER_VERSION __CWCC__
266  #endif
267  #define EA_COMPILER_NAME "Metrowerks"
268  //#define EA_COMPILER_STRING (defined below)
269 
270  #if (__MWERKS__ <= 0x2407) // If less than v7.x...
271  #define EA_COMPILER_NO_MEMBER_FUNCTION_SPECIALIZATION
272  #endif
273  #if (__MWERKS__ <= 0x3003) // If less than v8.x...
274  #define EA_COMPILER_NO_MEMBER_TEMPLATE_FRIENDS
275  #endif
276 
277 
278  // Microsoft VC++
279  #elif defined(_MSC_VER) && !(defined(__S3E__) && defined(__arm__)) // S3E is a mobile SDK which mistakenly masquerades as VC++ on ARM.
280  #define EA_COMPILER_MSVC
281  #define EA_COMPILER_VERSION _MSC_VER
282  #define EA_COMPILER_NAME "Microsoft Visual C++"
283  //#define EA_COMPILER_STRING (defined below)
284 
285  #if (_MSC_VER <= 1200) // If VC6.x and earlier...
286  #if (_MSC_VER < 1200)
287  #define EA_COMPILER_MSVCOLD
288  #else
289  #define EA_COMPILER_MSVC6
290  #endif
291 
292  #if (_MSC_VER < 1200) // If VC5.x or earlier...
293  #define EA_COMPILER_NO_TEMPLATE_SPECIALIZATION
294  #endif
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.
369  #ifndef EA_COMPILER_NO_TEMPLATE_PARTIAL_SPECIALIZATION
370  #define EA_COMPILER_PARTIAL_TEMPLATE_SPECIALIZATION
371  #endif
372  #ifndef EA_COMPILER_NO_TEMPLATE_SPECIALIZATION
373  #define EA_COMPILER_TEMPLATE_SPECIALIZATION
374  #endif
375  #ifndef EA_COMPILER_NO_MEMBER_TEMPLATES
376  #define EA_COMPILER_MEMBER_TEMPLATES
377  #endif
378  #ifndef EA_COMPILER_NO_MEMBER_TEMPLATE_SPECIALIZATION
379  #define EA_COMPILER_MEMBER_TEMPLATE_SPECIALIZATION
380  #endif
381 
382 
383 
384  // EA_COMPILER_NO_RTTI
385  //
386  // If EA_COMPILER_NO_RTTI is defined, then RTTI (run-time type information)
387  // is not available (possibly due to being disabled by the user).
388  //
389  #if defined(__SNC__) && !defined(__RTTI)
390  #define EA_COMPILER_NO_RTTI
391  #elif defined(__GXX_ABI_VERSION) && !defined(__GXX_RTTI)
392  #define EA_COMPILER_NO_RTTI
393  #elif defined(_MSC_VER) && !defined(_CPPRTTI)
394  #define EA_COMPILER_NO_RTTI
395  #elif defined(__MWERKS__)
396  #if !__option(RTTI)
397  #define EA_COMPILER_NO_RTTI
398  #endif
399  #endif
400 
401 
402 
403  // EA_COMPILER_NO_EXCEPTIONS / EA_COMPILER_NO_UNWIND
404  //
405  // If EA_COMPILER_NO_EXCEPTIONS is defined, then the compiler is
406  // configured to not recognize C++ exception-handling statements
407  // such as try/catch/throw. Thus, when EA_COMPILER_NO_EXCEPTIONS is
408  // defined, code that attempts to use exception handling statements
409  // will usually cause a compilation error. If is often desirable
410  // for projects to disable exception handling because exception
411  // handling causes extra code and/or data generation which might
412  // not be needed, especially if it is known that exceptions won't
413  // be happening. When writing code that is to be portable between
414  // systems of which some enable exception handling while others
415  // don't, check for EA_COMPILER_NO_EXCEPTIONS being defined.
416  //
417  #if defined(EA_COMPILER_GNUC) && defined(_NO_EX) // GCC on some platforms (e.g. PS3) defines _NO_EX when exceptions are disabled.
418  #define EA_COMPILER_NO_EXCEPTIONS
419 
420  #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.
421  #define EA_COMPILER_NO_EXCEPTIONS
422 
423  #elif defined(EA_COMPILER_METROWERKS)
424  #if !__option(exceptions)
425  #define EA_COMPILER_NO_EXCEPTIONS
426  #endif
427 
428  // Borland and Micrsoft use the _CPUUNWIND define to denote that
429  // exception stack unwinding code generation is disabled. The result
430  // is that you can call try/catch/throw and that exceptions will be
431  // caught handled, but that no automatic object destruction will
432  // happen between a throw and the resulting catch. We thus don't
433  // want to define EA_COMPILER_NO_EXCEPTIONS, but perhaps users might
434  // be interesting in knowing that unwinding is disabled.
435  #elif (defined(EA_COMPILER_BORLAND) || defined(EA_COMPILER_MSVC)) && !defined(_CPPUNWIND)
436  #define EA_COMPILER_NO_UNWIND
437 
438  #endif // EA_COMPILER_NO_EXCEPTIONS / EA_COMPILER_NO_UNWIND
439 
440 
441 
442  // EA_COMPILER_NO_STANDARD_CPP_LIBRARY
443  //
444  // If defined, then the compiler doesn't provide a Standard C++ library.
445  //
446  #if defined(EA_PLATFORM_ANDROID)
447  #define EA_COMPILER_NO_STANDARD_CPP_LIBRARY
448  #endif
449 
450 
451  // EA_COMPILER_NO_STATIC_VARIABLE_INIT
452  //
453  // If defined, it means that global or static C++ variables will be
454  // constructed. Not all compiler/platorm combinations support this.
455  // User code that needs to be portable must avoid having C++ variables
456  // that construct before main.
457  //
458  //#if defined(EA_PLATFORM_MOBILE)
459  // #define EA_COMPILER_NO_STATIC_VARIABLE_INIT
460  //#endif
461 
462 
463 
464  // EA_COMPILER_NO_STATIC_FUNCTION_INIT
465  //
466  // If defined, it means that functions marked as startup functions
467  // (e.g. __attribute__((constructor)) in GCC) are supported. It may
468  // be that some compiler/platform combinations don't support this.
469  //
470  //#if defined(XXX) // So far, all compiler/platforms we use support this.
471  // #define EA_COMPILER_NO_STATIC_VARIABLE_INIT
472  //#endif
473 
474 
475 
476 #endif // INCLUDED_eacompiler_H