Pārlūkot izejas kodu

Merge pull request #6437 from ppenzin/warnings-galore

Reenable implicit function declaration warnings
Petr Penzin 5 gadi atpakaļ
vecāks
revīzija
8b380763c6
4 mainītis faili ar 7 papildinājumiem un 6 dzēšanām
  1. 0 6
      CMakeLists.txt
  2. 1 0
      lib/Backend/BailOut.cpp
  3. 2 0
      lib/Common/CommonPal.h
  4. 4 0
      pal/inc/pal.h

+ 0 - 6
CMakeLists.txt

@@ -294,11 +294,6 @@ if(CLR_CMAKE_PLATFORM_XPLAT)
 
     set(CMAKE_CXX_STANDARD 11)
 
-    # CC WARNING FLAGS
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
-        -Wno-implicit-function-declaration"
-    )
-
     # todo: fix general visibility of the interface
     # do not set to `fvisibility=hidden` as it is going to
     # prevent the required interface is being exported
@@ -330,7 +325,6 @@ if(CLR_CMAKE_PLATFORM_XPLAT)
         -Wno-null-conversion\
         -Wno-return-type\
         -Wno-switch\
-        -Wno-implicit-function-declaration\
         -Wno-int-to-pointer-cast\
         -Wno-tautological-constant-compare\
         -Wno-enum-compare-switch\

+ 1 - 0
lib/Backend/BailOut.cpp

@@ -4,6 +4,7 @@
 //-------------------------------------------------------------------------------------------------------
 
 #include "Backend.h"
+#include "CommonPal.h"
 #ifdef ENABLE_SCRIPT_DEBUGGING
 #include "Debug/DebuggingFlags.h"
 #include "Debug/DiagProbe.h"

+ 2 - 0
lib/Common/CommonPal.h

@@ -516,6 +516,8 @@ __forceinline void * _AddressOfReturnAddress()
 {
     return (void*)((char*) __builtin_frame_address(0) + sizeof(void*));
 }
+#else
+extern "C" void * _AddressOfReturnAddress(void);
 #endif
 #else
 #error _AddressOfReturnAddress and _ReturnAddress not defined for this platform

+ 4 - 0
pal/inc/pal.h

@@ -47,6 +47,10 @@ Abstract:
 #include <ctype.h>
 #endif
 
+#if !defined(static_assert)
+#define static_assert _Static_assert
+#endif
+
 #if defined(__APPLE__)
 #ifndef __IOS__
 #include "TargetConditionals.h"