Enable most warnings in GCC

This commit is contained in:
Nekotekina 2019-05-10 20:24:14 +03:00
parent 7492f335e9
commit 5d33d9a3d9
7 changed files with 40 additions and 10 deletions

View file

@ -12,5 +12,13 @@ enum FPSCR_RN
// Get the exponent of a float
inline int fexpf(float x)
{
return ((u32&)x >> 23) & 0xFF;
union
{
char data[4];
u32 data32;
float arg;
};
arg = x;
return (data32 >> 23) & 0xFF;
}

View file

@ -3,6 +3,7 @@
#include "PPUThread.h"
#include "PPUInterpreter.h"
#include "Utilities/asm.h"
#include "Emu/Cell/Common.h"
#include <cmath>

View file

@ -1,6 +1,5 @@
#pragma once
#include "Common.h"
#include "../CPU/CPUThread.h"
#include "../Memory/vm.h"
#include "Utilities/lockless.h"

View file

@ -6,6 +6,7 @@
#include "Utilities/asm.h"
#include "SPUThread.h"
#include "SPUInterpreter.h"
#include "Emu/Cell/Common.h"
#include <cmath>
#include <cfenv>

View file

@ -1,6 +1,5 @@
#pragma once
#include "Emu/Cell/Common.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/Cell/SPUInterpreter.h"
#include "Emu/Memory/vm.h"

View file

@ -9,7 +9,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set compiler options here
# Warnings
add_compile_options(-Wall)
add_compile_options(-Wno-attributes -Wno-enum-compare -Wno-invalid-offsetof)
add_compile_options(-Wno-unknown-pragmas -Wno-unused-variable -Wno-reorder -Wno-comment)
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
# Clang 5.0 or latter is required
@ -20,6 +22,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
# Set compiler options here
add_compile_options(-ftemplate-depth=1024)
add_compile_options(-Wunused-value -Wunused-comparison)
if(APPLE)
add_compile_options(-stdlib=libc++)
endif()