This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

``extern'' in C files; Was: [PATCH RFA] linespec.c: fix no_symtab_msg declaration



> Index: linespec.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linespec.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 linespec.c
> --- linespec.c  2000/11/10 23:02:56     1.1
> +++ linespec.c  2000/11/19 03:58:41
> @@ -37,7 +37,7 @@ extern char *find_template_name_end (cha
> 
>  extern char *operator_chars (char *, char **);
> 
> -extern char *no_symtab_msg;
> +extern char no_symtab_msg[];
> 
>  /* Prototypes for local functions */
> 

A generalization as shoving ``extern'' declarations into C files has,
unfortunately, been a common practice :-(

``extern'' declarations in a C files are bad, M'kay :-)  The way to fix
it is to move the declaration to a header file (or simply eliminate the
problem, as Jim did :-).

	enjoy,
		Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]