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.
(cherry picked from commit
99a5c75f3b0916affdc8ea4a25d4bc87e67bca88)
function).\n\
To enable this behavior, run etags using --declarations.";
static bool with_mercury_definitions = false;
-float mercury_heuristics_ratio = MERCURY_HEURISTICS_RATIO;
+static float mercury_heuristics_ratio = MERCURY_HEURISTICS_RATIO;
static const char *Objc_suffixes [] =
{ "lm", /* Objective lex file */
printf (("};\n"
"extern struct emacs_globals globals;\n"
"\n"
- "#ifndef DEFINE_SYMBOLS\n"
- "extern\n"
- "#endif\n"
- "struct Lisp_Symbol lispsym[%td];\n"),
- num_symbols);
+ "extern struct Lisp_Symbol lispsym[%td];\n"
+ "#ifdef DEFINE_SYMBOLS\n"
+ "struct Lisp_Symbol lispsym[%td];\n"
+ "#endif\n"),
+ num_symbols, num_symbols);
}
static void
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;
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__ */
static const char emacs_bugreport[] = PACKAGE_BUGREPORT;
/* Put version info into the executable in the form that 'ident' uses. */
+extern char const RCS_Id[];
char const EXTERNALLY_VISIBLE RCS_Id[]
= "$Id" ": GNU Emacs " PACKAGE_VERSION
" (" EMACS_CONFIGURATION " " EMACS_CONFIG_FEATURES ") $";
}
/* Set this for debugging, to have a way to get out */
+extern int stop_character;
int stop_character EXTERNALLY_VISIBLE;
static KBOARD *
#define DECLARE_GDB_SYM(type, id) type const id EXTERNALLY_VISIBLE
#ifdef MAIN_PROGRAM
-# define DEFINE_GDB_SYMBOL_BEGIN(type, id) DECLARE_GDB_SYM (type, id)
+# define DEFINE_GDB_SYMBOL_BEGIN(type, id) \
+ extern DECLARE_GDB_SYM (type, id); DECLARE_GDB_SYM (type, id)
# define DEFINE_GDB_SYMBOL_END(id) = id;
#else
# define DEFINE_GDB_SYMBOL_BEGIN(type, id) extern DECLARE_GDB_SYM (type, id)
ptrdiff_t *, ptrdiff_t *);
/* Defined in alloc.c. */
+extern intptr_t garbage_collection_inhibited;
extern void *my_heap_start (void);
extern void check_pure_size (void);
unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int);
/* Stack of selections currently being processed.
NULL if all requests have been fully processed. */
-struct pgtk_selection_request *selection_request_stack;
+static struct pgtk_selection_request *selection_request_stack;
static void
pgtk_push_current_selection_request (struct selection_input_event *se,
static void print_interval (INTERVAL interval, void *pprintcharfun);
/* GDB resets this to zero on W32 to disable OutputDebugString calls. */
+extern bool print_output_debug_flag;
bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
\f
return false;
}
-extern intptr_t garbage_collection_inhibited;
-
/* Set the current message to STRING. */
static void
/* Stack of selections currently being processed.
NULL if all requests have been fully processed. */
-struct x_selection_request *selection_request_stack;
+static struct x_selection_request *selection_request_stack;
/* List of all outstanding selection transfers which are currently
being processed. */
-struct transfer outstanding_transfers;
+static struct transfer outstanding_transfers;
/* A counter for selection serials. */
selection requests inside long-lasting modal event loops, such as
the drag-and-drop loop. */
-struct x_selection_request_event *pending_selection_requests;
+static struct x_selection_request_event *pending_selection_requests;
struct x_atom_ref
{
/* The display the Motif drag receiver will send response data
from. */
-struct x_display_info *x_dnd_waiting_for_motif_finish_display;
+static struct x_display_info *x_dnd_waiting_for_motif_finish_display;
/* Whether or not F1 was pressed during the drag-and-drop operation.
\f
/* Set up use of X before we make the first connection. */
-extern frame_parm_handler x_frame_parm_handlers[];
-
static struct redisplay_interface x_redisplay_interface =
{
x_frame_parm_handlers,
/* From xfns.c. */
+extern frame_parm_handler x_frame_parm_handlers[];
extern void x_free_gcs (struct frame *);
extern void x_relative_mouse_position (struct frame *, int *, int *);
extern void x_real_pos_and_offsets (struct frame *, int *, int *, int *,