mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
compiler.h: added clang version of FUNC_NO_OPTIMIZE.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1512 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
cc987b449b
commit
b9e5285607
1 changed files with 5 additions and 1 deletions
|
@ -199,8 +199,12 @@ typedef int ssize_t;
|
|||
#define FUNCP_PRINTF(x,y)
|
||||
#endif
|
||||
|
||||
/* llvm's optnone function attribute started with clang-3.5.0 */
|
||||
#if defined(__clang__) && \
|
||||
(__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 5))
|
||||
#define FUNC_NO_OPTIMIZE __attribute__((__optnone__))
|
||||
/* function optimize attribute is added starting with gcc 4.4.0 */
|
||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 3))
|
||||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 3))
|
||||
#define FUNC_NO_OPTIMIZE __attribute__((__optimize__("0")))
|
||||
#else
|
||||
#define FUNC_NO_OPTIMIZE
|
||||
|
|
Loading…
Reference in a new issue