Skip to content

Commit 48c611c

Browse files
remutroLukeUsher
authored andcommitted
Fix optnone attribute warning
1 parent f338f50 commit 48c611c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nall/nall/platform.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,13 @@ namespace nall {
159159
#define MSG_NOSIGNAL 0
160160
#endif
161161

162-
#if defined(COMPILER_CLANG) || defined(COMPILER_GCC)
162+
#if defined(COMPILER_CLANG)
163163
#define no_optimize __attribute__((optnone))
164+
#elif defined(COMPILER_GCC)
165+
#define no_optimize __attribute__((optimize("O0")))
166+
#endif
167+
168+
#if defined(COMPILER_CLANG) || defined(COMPILER_GCC)
164169
#define NALL_NOINLINE __attribute__((noinline))
165170
#define alwaysinline inline __attribute__((always_inline))
166171
#define NALL_USED __attribute__((used))

0 commit comments

Comments
 (0)