Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Eli Zaretskii <eliz@elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc, rfa:doco] Add -Wunused-label to -Werror list
Date: Mon, 12 Jan 2004 18:55:00 -0000	[thread overview]
Message-ID: <4002ED99.5000108@gnu.org> (raw)
In-Reply-To: <3405-Sun11Jan2004203155+0200-eliz@elta.co.il>

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

> Date: Sun, 11 Jan 2004 11:58:48 -0500
>> From: Andrew Cagney <cagney@gnu.org>
>> 
>> Eli, doco look ok?
> 
> 
> Yes, except that I'd suggest to say more explicitly what is the
> programming error being shown in that fragment.  Someone might not get
> it...

Something like ...?



[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1697 bytes --]

2004-01-12  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo: Update copyright year.
	(Coding): Add -Wunused-label to list of -Werror warnings.

Index: gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.178
diff -u -r1.178 gdbint.texinfo
--- gdbint.texinfo	10 Nov 2003 22:47:31 -0000	1.178
+++ gdbint.texinfo	12 Jan 2004 18:53:52 -0000
@@ -8,7 +8,7 @@
 
 @ifinfo
 This file documents the internals of the GNU debugger @value{GDBN}.
-Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003
+Copyright 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,2002,2003,2004
    Free Software Foundation, Inc.
 Contributed by Cygnus Solutions.  Written by John Gilmore.
 Second Edition by Stan Shebs.
@@ -48,7 +48,7 @@
 
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,
-   2002, 2003  Free Software Foundation, Inc.
+   2002, 2003, 2004  Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -5132,6 +5132,23 @@
 @item -Wpointer-arith
 
 @item -Wuninitialized
+
+@item -Wunused-label
+This warning has the additional benefit of detecting the absence of the
+@code{case} reserved word in a switch statement:
+@smallexample
+enum @{ FD_SCHEDULED, NOTHING_SCHEDULED @} sched;
+@dots{}
+switch (sched)
+  @{
+  case FD_SCHEDULED:
+    @dots{};
+    break;
+  NOTHING_SCHEDULED:
+    @dots{};
+    break;
+  @}
+@end smallexample
 @end table
 
 @emph{Pragmatics: Due to the way that @value{GDBN} is implemented most

  reply	other threads:[~2004-01-12 18:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-11 16:59 Andrew Cagney
2004-01-11 18:35 ` Eli Zaretskii
2004-01-12 18:55   ` Andrew Cagney [this message]
2004-01-13  6:31     ` Eli Zaretskii
2004-01-13 17:07       ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4002ED99.5000108@gnu.org \
    --to=cagney@gnu.org \
    --cc=eliz@elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox