diff options
author | Sam James <sam@gentoo.org> | 2022-11-08 01:36:43 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-11-08 01:37:04 +0000 |
commit | 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d (patch) | |
tree | d42e6424ce3e312ad5aed331c4a0bfef37e1145e /libunwind | |
parent | ecedc4d71064b0d6fe1f5556b9bac37c6aa89bb3 (diff) | |
download | llvm-32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d.zip llvm-32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d.tar.gz llvm-32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d.tar.bz2 |
[CMake] Fix -Wstrict-prototypes
Fixes warnings (or errors, if someone injects -Werror in their build system,
which happens in fact with some folks vendoring LLVM too) with Clang 16:
```
+/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
-/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
int main() {return 0;}
^
void
```
Differential Revision: https://reviews.llvm.org/D137503
Diffstat (limited to 'libunwind')
-rw-r--r-- | libunwind/cmake/config-ix.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake index 96cb8af..d311477 100644 --- a/libunwind/cmake/config-ix.cmake +++ b/libunwind/cmake/config-ix.cmake @@ -85,7 +85,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unknown-pragmas") check_c_source_compiles(" #pragma comment(lib, \"c\") -int main() { return 0; } +int main(void) { return 0; } " C_SUPPORTS_COMMENT_LIB_PRAGMA) cmake_pop_check_state() endif() |