Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Base - Compiler (MSVC) - Configuration.h
    »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
    »Version«   4.51 / »GUID« A9981407-3EC9-42AF-8B6F-8BE6DD919615                                                                                                        */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/*  Copyright: © 2002-2017, Andrew Aye.  All Rights Reserved.
    This software is free for non-commercial use.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
    following conditions are met:
    Redistribution of source code must retain this copyright notice, this list of conditions and the following disclaimers.
    Redistribution in binary form must reproduce this copyright notice, this list of conditions and the following disclaimers in the documentation and other materials
    provided with the distribution.
    The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
    The intellectual property rights of the algorithms used reside with Andrew Aye.
    You may not use this software, in whole or in part, in support of any commercial product without the express written consent of the author.
    There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
#if !defined(TGS_COMMON_BASE_COMPILER_CONFIGURATION_H)
#define TGS_COMMON_BASE_COMPILER_CONFIGURATION_H
#pragma once

#if !defined(TgCOMPILER_MSVC)
#error Build arguments do not indicate this compiler
#endif


/* == Common ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Warnings and Messages                                                                                                                                                 */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

__pragma(comment( compiler ))

__pragma(comment( user, "Compiled on " __DATE__ " at " __TIME__ ))
__pragma(comment( user, "Copyright (C) 2002-2017 Andrew Aye.  All Rights Reserved." ))

__pragma(warning(disable : 4100)) /* Unreferenced formal parameter */
__pragma(warning(disable : 4127)) /* Conditional expression is constant */
__pragma(warning(disable : 4359)) /* Actual alignment (%d) is greater than the value specified in __declspec(align()) */
__pragma(warning(disable : 4447)) /* 'main' signature found without threading model. Consider using 'int main(Platform::Array<Platform::String^>^ args)' */
__pragma(warning(disable : 4464)) /* Relative include path contains '..' */
__pragma(warning(disable : 4514)) /* Unreferenced inline function has been removed */
__pragma(warning(disable : 4710)) /* Function not inline */
__pragma(warning(disable : 4711)) /* Function selected for automatic inline expansion */

/* C++ Warnings */
__pragma(warning(disable : 4164)) /* [FUNCTION]: intrinsic function not declared */
__pragma(warning(disable : 4190)) /* [FUNCTION] has C-linkage specified, but returns UDT '[TYPE]' which is incompatible with C */
__pragma(warning(disable : 4623)) /* [TYPE] default constructor was implicitly defined as deleted */
__pragma(warning(disable : 4625)) /* [TYPE] copy constructor was implicitly defined as deleted */
__pragma(warning(disable : 4626)) /* [TYPE] copy assignment was implicitly defined as deleted */
__pragma(warning(disable : 5026)) /* [TYPE] move constructor was implicitly defined as deleted */
__pragma(warning(disable : 5027)) /* [TYPE] move assignment was implicitly defined as deleted */

/* Analysis Warnings */
__pragma(warning(disable : 6320)) /* Analysis -Exception filter expression is the constant EXCEPTION_EXECUTE_HANDLER */
__pragma(warning(disable : 28251)) /* Inconsistent annotation for '': this instance has no annotations. */


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Macros                                                                                                                                                                */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#define CLANG_ATTRIBUTE(...)
#define CLANG_COMMAND(...)
#define CLANG_PRAGMA(...)

#define UNUSED_PARAM
#define UNUSED_FUNC
#define UNUSED_TYPE

#define MSVC_ATTRIBUTE(...) __VA_ARGS__
#define MSVC_PRAGMA(...) __pragma ( __VA_ARGS__ )

#define MSVC_WARN_SUPPRESS(A) __pragma(warning(suppress: A))
#define MSVC_WARN_DISABLE_PUSH(...) \
__pragma(warning(push)) \
__pragma(warning(disable: __VA_ARGS__))
#define MSVC_WARN_DISABLE_POP(...) __pragma(warning(pop))

#define CLANG_WARN_SUPPRESS(clang_option)
#define CLANG_WARN_DISABLE_PUSH(clang_option)
#define CLANG_WARN_DISABLE_POP(clang_option)

#define WARN_SUPPRESS(msvc_unused,clang_option) MSVC_WARN_SUPPRESS(msvc_unused)
#define WARN_DISABLE_PUSH(msvc_unused,clang_option) MSVC_WARN_DISABLE_PUSH(msvc_unused)
#define WARN_DISABLE_POP() CLANG_WARN_DISABLE_POP()

#define TgANALYSIS_ASSUME(...) __analysis_assume(__VA_ARGS__)

#define SWITCH_FALLTHROUGH


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Keyword Replacements                                                                                                                                                  */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#define DLL_IMPORT                          __declspec(dllimport)       /* Import function from DLL */
#define DLL_EXPORT                          __declspec(dllexport)       /* Export function to DLL */
#define CDECL                               __cdecl                     /* Standard C function */
#define STDCALL                             __stdcall                   /* Standard calling convention */
#define TgFORCEINLINE                       __forceinline               /* Force code to be TgINLINE */
#define TgINLINE                            __inline
#define TgALIGN(A)                          __declspec(align(A))
#define TgTLS                               __declspec( thread )
#define TgEXPECT_TRUE(...)                  (__VA_ARGS__)
#define TgEXPECT_FALSE(...)                 (__VA_ARGS__)
#define TgPASSINREG                         
#define TgALIAS                             

#if TgCOMPILE_ASSERT
#define TgS_NO_DEFAULT(...)                 TgCRITICAL(0); __VA_ARGS__
#else
#define TgS_NO_DEFAULT(...)                 __assume(0)
#endif

#define TgBREAK_INLINE                      __debugbreak()


/* ====================================================================================================================================================================== */
#endif