Convert GCC 14 errors back to warnings (#1247)

https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors

Changing these to warnings helps build code with `cosmocc`. Perhaps this
can be a patch to `cosmocc` or skipped entirely.
This commit is contained in:
Gautham 2024-08-01 23:42:40 -05:00 committed by GitHub
parent 6ac3d3b804
commit 9ebacb7892
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,12 @@
#define COSMOPOLITAN_CXX_USING_ #define COSMOPOLITAN_CXX_USING_
#endif #endif
#ifndef __cplusplus
#pragma GCC diagnostic warning "-Wimplicit-function-declaration"
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#pragma GCC diagnostic warning "-Wint-conversion"
#endif
#if !defined(__GNUC__) && __cplusplus + 0 >= 201103L #if !defined(__GNUC__) && __cplusplus + 0 >= 201103L
#define typeof(x) decltype(x) #define typeof(x) decltype(x)
#elif !defined(__GNUC__) && __STDC_VERSION__ + 0 < 201112 #elif !defined(__GNUC__) && __STDC_VERSION__ + 0 < 201112