1 /*---------------------------------------------------------------------------*
2 Project: NintendoWare
3 File: msvc.h
4
5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Revision: 16785 $
14 *---------------------------------------------------------------------------*/
15
16 #ifndef NW_CONFIG_COMPILER_MSVC_H_
17 #define NW_CONFIG_COMPILER_MSVC_H_
18
19 #pragma warning( disable : 4200 ) // warning: zero-sized array in struct/union
20 #pragma warning( disable : 4311 ) // warning: pointer truncation from 'type' to 'type'
21 #pragma warning( disable : 4312 ) // warning: conversion from 'type' to 'type' of greater size
22 #pragma warning( disable : 4355 ) // warning: used in base member initializer list
23
24 #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
25 #define NW_COMPILER_WITH_W64
26 #endif
27
28 #define NW_NO_THROW throw()
29 #define NW_NO_INLINE(function) __declspec(noinline) function
30
31 #include <limits.h>
32 #include <float.h>
33
34 inline int
isfinite(float f)35 isfinite(float f)
36 {
37 return _finite( f );
38 }
39
40 inline int
isnan(float f)41 isnan(float f)
42 {
43 return _isnan( f );
44 }
45
46 void* operator new( size_t size, void* ptr );
47 void* operator new[]( size_t size, void* ptr );
48 void operator delete( void* memory, void* ptr );
49 void operator delete[]( void* memory, void* ptr );
50
51 /* NW_CONFIG_COMPILER_MSVC_H_ */
52 #endif
53