Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] more all-target -Werror patches
@ 2002-10-01  9:18 David Carlton
  2002-10-01  9:30 ` Andrew Cagney
  2002-10-01 12:32 ` Michael Snyder
  0 siblings, 2 replies; 7+ messages in thread
From: David Carlton @ 2002-10-01  9:18 UTC (permalink / raw)
  To: gdb-patches

Here are the last patches for getting GDB to build on my machine on
all targets with -Werror if appropriate.

OK to commit?  The gdb_string ones are pretty obvious; I'm not sure
why GCC is issuing a warning on remote-sds.c that requires me to
insert a stray semicolon to quell it, but doing so shouldn't hurt
anything.

David Carlton
carlton@math.stanford.edu

2002-09-30  David Carlton  <carlton@math.stanford.edu>

	* Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
	* ppc-sysv-tdep.c: #include "gdb_string.h".
	* remote-sds.c (getmessage): Add semicolon after 'retry' label to
	pacify GCC.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.262.2.7
diff -u -p -r1.262.2.7 Makefile.in
--- Makefile.in	27 Sep 2002 20:03:04 -0000	1.262.2.7
+++ Makefile.in	30 Sep 2002 18:47:59 -0000
@@ -1978,7 +1978,7 @@ ppc-linux-tdep.o: ppc-linux-tdep.c $(def
 	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
 	$(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
 ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	$(regcache_h) $(value_h) $(ppc_tdep_h)
+	$(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
 ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(serial_h) $(regcache_h)
 ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \

Index: ppc-sysv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
retrieving revision 1.1
diff -u -p -r1.1 ppc-sysv-tdep.c
--- ppc-sysv-tdep.c	30 May 2002 01:21:51 -0000	1.1
+++ ppc-sysv-tdep.c	30 Sep 2002 18:48:17 -0000
@@ -25,6 +25,7 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "value.h"
+#include "gdb_string.h"
 
 #include "ppc-tdep.h"
 
Index: remote-sds.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sds.c,v
retrieving revision 1.20
diff -u -p -r1.20 remote-sds.c
--- remote-sds.c	10 Feb 2002 04:08:42 -0000	1.20
+++ remote-sds.c	30 Sep 2002 18:45:17 -0000
@@ -978,6 +978,7 @@ getmessage (unsigned char *buf, int fore
       /* Try the whole thing again.  */
     retry:
       /* need to do something here */
+      ;
     }
 
   /* We have tried hard enough, and just can't receive the packet.  Give up. */


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

* Re: [rfa] more all-target -Werror patches
  2002-10-01  9:18 [rfa] more all-target -Werror patches David Carlton
@ 2002-10-01  9:30 ` Andrew Cagney
  2002-10-01 12:29   ` David Carlton
  2002-10-01 12:32 ` Michael Snyder
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-10-01  9:30 UTC (permalink / raw)
  To: David Carlton; +Cc: gdb-patches

> Here are the last patches for getting GDB to build on my machine on
> all targets with -Werror if appropriate.
> 
> OK to commit?  The gdb_string ones are pretty obvious; I'm not sure
> why GCC is issuing a warning on remote-sds.c that requires me to
> insert a stray semicolon to quell it, but doing so shouldn't hurt
> anything.
> 
> David Carlton
> carlton@math.stanford.edu
> 
> 2002-09-30  David Carlton  <carlton@math.stanford.edu>
> 
> 	* Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
> 	* ppc-sysv-tdep.c: #include "gdb_string.h".
> 	* remote-sds.c (getmessage): Add semicolon after 'retry' label to
> 	pacify GCC.

Yes, definitly.

Andrew


> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/Makefile.in,v
> retrieving revision 1.262.2.7
> diff -u -p -r1.262.2.7 Makefile.in
> --- Makefile.in	27 Sep 2002 20:03:04 -0000	1.262.2.7
> +++ Makefile.in	30 Sep 2002 18:47:59 -0000
> @@ -1978,7 +1978,7 @@ ppc-linux-tdep.o: ppc-linux-tdep.c $(def
>  	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
>  	$(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
>  ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
> -	$(regcache_h) $(value_h) $(ppc_tdep_h)
> +	$(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
>  ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
>  	$(serial_h) $(regcache_h)
>  ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
> 
> Index: ppc-sysv-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 ppc-sysv-tdep.c
> --- ppc-sysv-tdep.c	30 May 2002 01:21:51 -0000	1.1
> +++ ppc-sysv-tdep.c	30 Sep 2002 18:48:17 -0000
> @@ -25,6 +25,7 @@
>  #include "inferior.h"
>  #include "regcache.h"
>  #include "value.h"
> +#include "gdb_string.h"
>  
>  #include "ppc-tdep.h"
>  
> Index: remote-sds.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-sds.c,v
> retrieving revision 1.20
> diff -u -p -r1.20 remote-sds.c
> --- remote-sds.c	10 Feb 2002 04:08:42 -0000	1.20
> +++ remote-sds.c	30 Sep 2002 18:45:17 -0000
> @@ -978,6 +978,7 @@ getmessage (unsigned char *buf, int fore
>        /* Try the whole thing again.  */
>      retry:
>        /* need to do something here */
> +      ;
>      }
>  
>    /* We have tried hard enough, and just can't receive the packet.  Give up. */
> 



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

* Re: [rfa] more all-target -Werror patches
  2002-10-01  9:30 ` Andrew Cagney
@ 2002-10-01 12:29   ` David Carlton
  0 siblings, 0 replies; 7+ messages in thread
From: David Carlton @ 2002-10-01 12:29 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Tue, 01 Oct 2002 12:30:46 -0400, Andrew Cagney <ac131313@redhat.com> said:

>> 2002-09-30 David Carlton <carlton@math.stanford.edu>

>> * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
>> * ppc-sysv-tdep.c: #include "gdb_string.h".
>> * remote-sds.c (getmessage): Add semicolon after 'retry' label to
>> pacify GCC.

> Yes, definitly.

Committed.

David Carlton
carlton@math.stanford.edu


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

* Re: [rfa] more all-target -Werror patches
  2002-10-01  9:18 [rfa] more all-target -Werror patches David Carlton
  2002-10-01  9:30 ` Andrew Cagney
@ 2002-10-01 12:32 ` Michael Snyder
  2002-10-01 12:37   ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2002-10-01 12:32 UTC (permalink / raw)
  To: David Carlton; +Cc: gdb-patches

David Carlton wrote:
> 
> Here are the last patches for getting GDB to build on my machine on
> all targets with -Werror if appropriate.
> 
> OK to commit?  The gdb_string ones are pretty obvious; I'm not sure
> why GCC is issuing a warning on remote-sds.c that requires me to
> insert a stray semicolon to quell it, but doing so shouldn't hurt
> anything.

I'm uneasy about inserting semi-random stuff just to quiet a compiler
complaint that doesn't necessarily make sense (is the compiler wrong?)
Certainly it should be documented if you do it, else someone later may
take it out, not knowing what it's there for.

> 
> David Carlton
> carlton@math.stanford.edu
> 
> 2002-09-30  David Carlton  <carlton@math.stanford.edu>
> 
>         * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h.
>         * ppc-sysv-tdep.c: #include "gdb_string.h".
>         * remote-sds.c (getmessage): Add semicolon after 'retry' label to
>         pacify GCC.
> 
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/Makefile.in,v
> retrieving revision 1.262.2.7
> diff -u -p -r1.262.2.7 Makefile.in
> --- Makefile.in 27 Sep 2002 20:03:04 -0000      1.262.2.7
> +++ Makefile.in 30 Sep 2002 18:47:59 -0000
> @@ -1978,7 +1978,7 @@ ppc-linux-tdep.o: ppc-linux-tdep.c $(def
>         $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
>         $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h)
>  ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
> -       $(regcache_h) $(value_h) $(ppc_tdep_h)
> +       $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
>  ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
>         $(serial_h) $(regcache_h)
>  ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
> 
> Index: ppc-sysv-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-sysv-tdep.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 ppc-sysv-tdep.c
> --- ppc-sysv-tdep.c     30 May 2002 01:21:51 -0000      1.1
> +++ ppc-sysv-tdep.c     30 Sep 2002 18:48:17 -0000
> @@ -25,6 +25,7 @@
>  #include "inferior.h"
>  #include "regcache.h"
>  #include "value.h"
> +#include "gdb_string.h"
> 
>  #include "ppc-tdep.h"
> 
> Index: remote-sds.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-sds.c,v
> retrieving revision 1.20
> diff -u -p -r1.20 remote-sds.c
> --- remote-sds.c        10 Feb 2002 04:08:42 -0000      1.20
> +++ remote-sds.c        30 Sep 2002 18:45:17 -0000
> @@ -978,6 +978,7 @@ getmessage (unsigned char *buf, int fore
>        /* Try the whole thing again.  */
>      retry:
>        /* need to do something here */
> +      ;
>      }
> 
>    /* We have tried hard enough, and just can't receive the packet.  Give up. */


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

* Re: [rfa] more all-target -Werror patches
  2002-10-01 12:32 ` Michael Snyder
@ 2002-10-01 12:37   ` Daniel Jacobowitz
  2002-10-01 12:43     ` David Carlton
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2002-10-01 12:37 UTC (permalink / raw)
  To: Michael Snyder; +Cc: David Carlton, gdb-patches

On Tue, Oct 01, 2002 at 12:31:51PM -0700, Michael Snyder wrote:
> David Carlton wrote:
> > 
> > Here are the last patches for getting GDB to build on my machine on
> > all targets with -Werror if appropriate.
> > 
> > OK to commit?  The gdb_string ones are pretty obvious; I'm not sure
> > why GCC is issuing a warning on remote-sds.c that requires me to
> > insert a stray semicolon to quell it, but doing so shouldn't hurt
> > anything.
> 
> I'm uneasy about inserting semi-random stuff just to quiet a compiler
> complaint that doesn't necessarily make sense (is the compiler wrong?)
> Certainly it should be documented if you do it, else someone later may
> take it out, not knowing what it's there for.

Well, it's right.  Labels without any expression to label aren't legal
C.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [rfa] more all-target -Werror patches
  2002-10-01 12:37   ` Daniel Jacobowitz
@ 2002-10-01 12:43     ` David Carlton
  2002-10-01 13:15       ` David Carlton
  0 siblings, 1 reply; 7+ messages in thread
From: David Carlton @ 2002-10-01 12:43 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Michael Snyder, gdb-patches

On Tue, 1 Oct 2002 15:37:12 -0400, Daniel Jacobowitz <drow@mvista.com> said:
> On Tue, Oct 01, 2002 at 12:31:51PM -0700, Michael Snyder wrote:

>> I'm uneasy about inserting semi-random stuff just to quiet a
>> compiler complaint that doesn't necessarily make sense (is the
>> compiler wrong?)  Certainly it should be documented if you do it,
>> else someone later may take it out, not knowing what it's there
>> for.

> Well, it's right.  Labels without any expression to label aren't
> legal C.

I'm glad to know it's right; on the other hand, I agree with Michael
that it should be documented.  How about I change the existing comment

  /* need to do something here */

to

  /* FIXME: We need to do something here.  For now, just put in a
     semicolon so the label has an expression to stick to.  (GCC will
     complain otherwise.)  */

And yes, I realize that FIXME's should ideally have a name attached to
them, but that name should be the author of the original comment
rather than mine, and I don't know who that is.

David Carlton
carlton@math.stanford.edu


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

* Re: [rfa] more all-target -Werror patches
  2002-10-01 12:43     ` David Carlton
@ 2002-10-01 13:15       ` David Carlton
  0 siblings, 0 replies; 7+ messages in thread
From: David Carlton @ 2002-10-01 13:15 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Michael Snyder, gdb-patches

On 01 Oct 2002 12:43:42 -0700, David Carlton <carlton@math.Stanford.EDU> said:

> How about I change the existing comment

>   /* need to do something here */

> to

>   /* FIXME: We need to do something here.  For now, just put in a
>      semicolon so the label has an expression to stick to.  (GCC will
>      complain otherwise.)  */

> And yes, I realize that FIXME's should ideally have a name attached to
> them, but that name should be the author of the original comment
> rather than mine, and I don't know who that is.

Now that I look at the code, I'm really not sure what comment should
go there.  It's not clear to me what the intent of the original
comment is: I'd assumed that it meant that there should be code after
the retry label, but it's not at all clear to me why one would expect
that to be the case: the function looks sensible enough as it is.
So maybe I should leave the initial comment intact, and add the
following comment:

/* NOTE: carlton/2002-10-01: The semicolon is there so the label has
   an expression to stick to.  (GCC will complain otherwise.)  */

David Carlton
carlton@math.stanford.edu


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

end of thread, other threads:[~2002-10-01 20:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-01  9:18 [rfa] more all-target -Werror patches David Carlton
2002-10-01  9:30 ` Andrew Cagney
2002-10-01 12:29   ` David Carlton
2002-10-01 12:32 ` Michael Snyder
2002-10-01 12:37   ` Daniel Jacobowitz
2002-10-01 12:43     ` David Carlton
2002-10-01 13:15       ` David Carlton

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