Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Add 'static' keyword
@ 2006-10-25 21:27 Jim Blandy
  2006-10-25 22:54 ` Pierre Muller
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2006-10-25 21:27 UTC (permalink / raw)
  To: gdb-patches


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,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Add 'static' keyword
  2006-10-25 21:27 PATCH: Add 'static' keyword Jim Blandy
@ 2006-10-25 22:54 ` Pierre Muller
  2006-10-26 21:13   ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Muller @ 2006-10-25 22:54 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

   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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Add 'static' keyword
  2006-10-25 22:54 ` Pierre Muller
@ 2006-10-26 21:13   ` Jim Blandy
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2006-10-26 21:13 UTC (permalink / raw)
  To: muller; +Cc: gdb-patches


"Pierre Muller" <muller@ics.u-strasbg.fr> writes:
>    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.

Thanks!  It's no big problem.  I did look at the other functions, and
it seemed fine.

I was looking into correcting the warnings produced by the stock
Fedora Core 5 compiler --- I understand the warnings don't occur any
more, but copying around obstack structures is gross --- but when I
realized I didn't have a pascal compiler installed to test the change
anyway, I lost enthusiasm for the change.

So all GDB got in the end was one 'static'.  :(


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-26 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25 21:27 PATCH: Add 'static' keyword Jim Blandy
2006-10-25 22:54 ` Pierre Muller
2006-10-26 21:13   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox