diff options
| author | Paul Eggert | 2023-05-14 18:51:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2023-05-14 19:28:12 -0700 |
| commit | 0c11c2ae71fcc03d98b35384d6c70e6d7454ba90 (patch) | |
| tree | 44ec42b4afb9795514005850ef50f378f1c6a0b6 /src/alloc.c | |
| parent | 4fedd5af4cc53666277fbcfc3417c0d7e3201c1d (diff) | |
| download | emacs-0c11c2ae71fcc03d98b35384d6c70e6d7454ba90.tar.gz emacs-0c11c2ae71fcc03d98b35384d6c70e6d7454ba90.zip | |
Pacify GCC 13 -Wanalyzer-out-of-bounds
* src/alloc.c (NEAR_STACK_TOP): Hoist from here ...
* src/thread.h: ... to here.
* src/print.c (print_object): Use NEAR_STACK_TOP instead of raw
buffer address. This is more natural, and pacifies GCC 13.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c index 6391ede8d0a..29393deeff4 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5338,15 +5338,6 @@ typedef union | |||
| 5338 | #endif | 5338 | #endif |
| 5339 | } stacktop_sentry; | 5339 | } stacktop_sentry; |
| 5340 | 5340 | ||
| 5341 | /* Yield an address close enough to the top of the stack that the | ||
| 5342 | garbage collector need not scan above it. Callers should be | ||
| 5343 | declared NO_INLINE. */ | ||
| 5344 | #ifdef HAVE___BUILTIN_FRAME_ADDRESS | ||
| 5345 | # define NEAR_STACK_TOP(addr) ((void) (addr), __builtin_frame_address (0)) | ||
| 5346 | #else | ||
| 5347 | # define NEAR_STACK_TOP(addr) (addr) | ||
| 5348 | #endif | ||
| 5349 | |||
| 5350 | /* Set *P to the address of the top of the stack. This must be a | 5341 | /* Set *P to the address of the top of the stack. This must be a |
| 5351 | macro, not a function, so that it is executed in the caller's | 5342 | macro, not a function, so that it is executed in the caller's |
| 5352 | environment. It is not inside a do-while so that its storage | 5343 | environment. It is not inside a do-while so that its storage |