diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-11-21 10:22:10 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-21 10:22:10 (GMT) |
| commit | aa067868ec20f7d9b9f4f36b4a9daebfa74efec5 (patch) | |
| tree | 1204c9fa24f6dccc6294636a32a250f7bc0b94de /Python/pylifecycle.c | |
| parent | f38164481974a5ca643ec9ae19f118d8ad32353f (diff) | |
| download | cpython-aa067868ec20f7d9b9f4f36b4a9daebfa74efec5.zip cpython-aa067868ec20f7d9b9f4f36b4a9daebfa74efec5.tar.gz cpython-aa067868ec20f7d9b9f4f36b4a9daebfa74efec5.tar.bz2 | |
[3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)
gh-99337: Fix compile errors with gcc 12 on macOS (GH-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
(cherry picked from commit cdde29dde90947df9bac39c1d19479914fb3db09)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Diffstat (limited to 'Python/pylifecycle.c')
| -rw-r--r-- | Python/pylifecycle.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 0363e2e..4060c23 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -82,6 +82,10 @@ int _Py_UnhandledKeyboardInterrupt = 0; * 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"))) |
