This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: PATCH: Add 'static' keyword


   The problem is that I am not really a confirmed C code writer,
I basically started C programming to add pascal language
support in GDB.
   The same kind of error could be repeated in several
other locations, I did not even think that it was
a good practice to repeat 'static' in the implementation.

  Don't hesitate to correct others.


Pierre Muller

On Wed, October 25, 2006 23:27, Jim Blandy said:
>
> It's helpful when reading code to be able to see that a function is
> static simply looking at its definition.
>
> Committed as obvious.
>
> gdb/ChangeLog:
> 2006-10-25  Jim Blandy  <jimb@codesourcery.com>
>
> 	* p-valprint.c (pascal_object_print_value): Add 'static' keyword
> 	to function definition, to match declaration earlier in file.
>
> Index: gdb/p-valprint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/p-valprint.c,v
> retrieving revision 1.41
> diff -u -r1.41 p-valprint.c
> --- gdb/p-valprint.c	18 Jan 2006 21:24:19 -0000	1.41
> +++ gdb/p-valprint.c	25 Oct 2006 21:25:22 -0000
> @@ -915,7 +915,7 @@
>  /* Special val_print routine to avoid printing multiple copies of virtual
>     baseclasses.  */
>
> -void
> +static void
>  pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
>  			   CORE_ADDR address, struct ui_file *stream,
>  			   int format, int recurse,
>


Pierre Muller
Institut Charles Sadron
aux Etats-Unis jusqu'à fin octobre 2006


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