public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/8093: Wrong warning by gcc suggests adding dead code to end of function
@ 2002-09-30  5:26 andreaha-bugs
  0 siblings, 0 replies; 2+ messages in thread
From: andreaha-bugs @ 2002-09-30  5:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8093
>Category:       c
>Synopsis:       Wrong warning by gcc suggests adding dead code to end of function
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 30 05:25:59 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Aardal Hanssen
>Release:        gcc version 2.96 20000731 (gcc-c++-2.96-112)
>Organization:
>Environment:
Linux, bash
>Description:
gcc gives a wrong warning when compiling the attached file
with -Wall.

It falsely claims that the control reaches the end of a
non-void function, when control can never reach the end.
>How-To-Repeat:
gcc -Wall test.cc -o test
>Fix:
?
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"

I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgdGhlc2FtZWFzKGludCBhKSAKewogIGlmIChhICE9IDEg
JiYgYSAhPSAyICYmIGEgIT0gMyAmJiBhICE9IDQpCiAgICByZXR1cm4gLTE7CgogIGlmIChhID09
IDEpCiAgICByZXR1cm4gMTsKCiAgaWYgKGEgPT0gMikKICAgIHJldHVybiAyOwoKICBpZiAoYSA9
PSAzKQogICAgcmV0dXJuIDM7CgogIGlmIChhID09IDQpCiAgICByZXR1cm4gNDsKfQoKaW50IG1h
aW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KSB7CgogIHByaW50ZigiJWkgaXMgdGhlIHNhbWUgYXMg
JWlcbiIsIDEsIDMpOwoKCn0K


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

* Re: c/8093: Wrong warning by gcc suggests adding dead code to end of function
@ 2002-09-30 14:25 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-09-30 14:25 UTC (permalink / raw)
  To: andreaha-bugs, gcc-bugs, gcc-prs, nobody

Synopsis: Wrong warning by gcc suggests adding dead code to end of function

State-Changed-From-To: open->suspended
State-Changed-By: rth
State-Changed-When: Mon Sep 30 14:25:47 2002
State-Changed-Why:
    This will probably never be fixed.  Completely general value
    propagation is too compile-time expensive.
    
    Use a switch.

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


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

end of thread, other threads:[~2002-09-30 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-30  5:26 c/8093: Wrong warning by gcc suggests adding dead code to end of function andreaha-bugs
2002-09-30 14:25 rth

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).