From 99a5c75f3b0916affdc8ea4a25d4bc87e67bca88 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 4 May 2024 10:08:48 -0700 Subject: Pacify gcc -Wmissing-variable-declarations This is a new warning diagnostic in GCC 14. * lib-src/etags.c (mercury_heuristics_ratio): * src/pgtkselect.c, src/xselect.c (selection_request_stack): * src/xselect.c (outstanding_transfers): * src/xterm.c (pending_selection_requests) (x_dnd_waiting_for_motif_finish_display): Now static. * lib-src/make-docfile.c (close_emacs_globals): Arrange for lispsym to be declared with extern first, when compiling lread.c. * src/alloc.c (gdb_make_enums_visible) [__GNUC__]: * src/emacs.c (RCS_Id): * src/keyboard.c (stop_character): * src/print.c (print_output_debug_flag): Now declared with extern first. * src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]: Arrange for ID to be declared extern first. * src/lisp.h (garbage_collection_inhibited): * src/xterm.h (x_frame_parm_handlers): Declare here, so that its interface is properly checked. Other decls removed. --- src/alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/alloc.c') diff --git a/src/alloc.c b/src/alloc.c index 4226cb1d1a0..28e32554472 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -8338,7 +8338,7 @@ enum defined_HAVE_PGTK { defined_HAVE_PGTK = false }; then xbacktrace could fail. Similarly for the other enums and their values. Some non-GCC compilers don't like these constructs. */ #ifdef __GNUC__ -union +extern union enums_for_gdb { enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS; enum char_table_specials char_table_specials; @@ -8353,5 +8353,6 @@ union enum pvec_type pvec_type; enum defined_HAVE_X_WINDOWS defined_HAVE_X_WINDOWS; enum defined_HAVE_PGTK defined_HAVE_PGTK; -} const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0}; +} const gdb_make_enums_visible; +union enums_for_gdb const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0}; #endif /* __GNUC__ */ -- cgit v1.2.1