mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
gh-99337: Fix compile errors with gcc 12 on macOS (#99470)
Fix a number of compile errors with GCC-12 on macOS: 1. In pylifecycle.c the compile rejects _Pragma within a declaration 2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS 3. _ctypes assumed that __builtin_available is always present on macOS
This commit is contained in:
parent
6d8da238cc
commit
cdde29dde9
7 changed files with 54 additions and 9 deletions
|
@ -82,6 +82,10 @@ static void call_ll_exitfuncs(_PyRuntimeState *runtime);
|
|||
* interpreter state for various runtime debugging tools, but is *not* an
|
||||
* officially supported feature */
|
||||
|
||||
/* Suppress deprecation warning for PyBytesObject.ob_shash */
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
|
||||
#if defined(MS_WINDOWS)
|
||||
|
||||
#pragma section("PyRuntime", read, write)
|
||||
|
@ -95,9 +99,6 @@ __attribute__((
|
|||
|
||||
#endif
|
||||
|
||||
/* Suppress deprecation warning for PyBytesObject.ob_shash */
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
_PyRuntimeState _PyRuntime
|
||||
#if defined(__linux__) && (defined(__GNUC__) || defined(__clang__))
|
||||
__attribute__ ((section (".PyRuntime")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue