public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8548: switch-statement
@ 2002-12-11 12:47 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-12-11 12:47 UTC (permalink / raw)
  To: Frank.Cornelis, gcc-bugs, gcc-prs, nobody

Synopsis: switch-statement

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Dec 11 12:47:08 2002
State-Changed-Why:
    Andreas already explained what is wrong with your code.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8548


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

* Re: c/8548: switch-statement
@ 2002-11-19 16:01 Andreas Schwab
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2002-11-19 16:01 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

The following reply was made to PR c/8548; it has been noted by GNATS.

From: Andreas Schwab <schwab@suse.de>
To: Frank.Cornelis@elis.rug.ac.be
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/8548: switch-statement
Date: Tue, 12 Nov 2002 17:05:35 +0100

 Frank.Cornelis@elis.rug.ac.be writes:
 
 |> switch (family) {
 |> case PF_LOCAL:
 |> case PF_UNIX:
 |> break;
 |> }
 |> is not a legal statement according to GCC because the macro's evaluate to the same value. This would be true for case-statements with a break in between, not for case-statements handled by the same body. Should be fixed.
 
 Yes, you should fix your code.
 
 Andreas.
 
 -- 
 Andreas Schwab, SuSE Labs, schwab@suse.de
 SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
 Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
 "And now for something completely different."


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

* c/8548: switch-statement
@ 2002-11-19 15:26 Frank.Cornelis
  0 siblings, 0 replies; 3+ messages in thread
From: Frank.Cornelis @ 2002-11-19 15:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8548
>Category:       c
>Synopsis:       switch-statement
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 07:56:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frank.Cornelis@elis.rug.ac.be
>Release:        3.2
>Organization:
>Environment:

>Description:
switch (family) {
case PF_LOCAL:
case PF_UNIX:
break;
}
is not a legal statement according to GCC because the macro's evaluate to the same value. This would be true for case-statements with a break in between, not for case-statements handled by the same body. Should be fixed.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-11 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11 12:47 c/8548: switch-statement bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-11-19 16:01 Andreas Schwab
2002-11-19 15:26 Frank.Cornelis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).