* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
@ 2008-10-21 21:05 ` manu at gcc dot gnu dot org
2008-10-21 22:57 ` flameeyes at gentoo dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-10-21 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from manu at gcc dot gnu dot org 2008-10-21 21:03 -------
We need a complete testcase. See http://gcc.gnu.org/bugs.html
In this case, we would need the unpreprocessed testcase but we still need a
complete one that we can compile ourselves. Thanks.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
2008-10-21 21:05 ` [Bug c/37881] " manu at gcc dot gnu dot org
@ 2008-10-21 22:57 ` flameeyes at gentoo dot org
2008-10-21 23:13 ` manu at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2008-10-21 22:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from flameeyes at gentoo dot org 2008-10-21 22:56 -------
Created an attachment (id=16523)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16523&action=view)
tc-htons-unreachable.c
Sure here it is, there isn't much of a testcase I admit ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
2008-10-21 21:05 ` [Bug c/37881] " manu at gcc dot gnu dot org
2008-10-21 22:57 ` flameeyes at gentoo dot org
@ 2008-10-21 23:13 ` manu at gcc dot gnu dot org
2008-10-21 23:20 ` flameeyes at gentoo dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-10-21 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from manu at gcc dot gnu dot org 2008-10-21 23:12 -------
I cannot reproduce this because it seems that in my system
x86_64-unknown-linux-gnu, htons is not expanded as a macro.
Could you also add a preprocessed testcase and the exact output from the
compiler? Please, also use -fshow-column, -fdiagnostics-show-option and -v.
Thanks.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-10-21 23:12:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
` (2 preceding siblings ...)
2008-10-21 23:13 ` manu at gcc dot gnu dot org
@ 2008-10-21 23:20 ` flameeyes at gentoo dot org
2008-10-21 23:38 ` manu at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2008-10-21 23:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from flameeyes at gentoo dot org 2008-10-21 23:19 -------
Created an attachment (id=16524)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16524&action=view)
Preprocessed test case
For what it's worth this is glibc 2.8 on Gentoo, AMD64 multilib system.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
` (3 preceding siblings ...)
2008-10-21 23:20 ` flameeyes at gentoo dot org
@ 2008-10-21 23:38 ` manu at gcc dot gnu dot org
2008-10-21 23:49 ` flameeyes at gentoo dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-10-21 23:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2008-10-21 23:36 -------
(In reply to comment #4)
> Created an attachment (id=16524)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16524&action=view) [edit]
> Preprocessed test case
>
I don't see that htons was expanded as a macro there. Moreover, I am interested
in the output from the compiler when you use -Wunreachable-code together with
the options I mentioned (that is, the output given by gcc when it throws a
warning that you think it should not throw).
Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
` (4 preceding siblings ...)
2008-10-21 23:38 ` manu at gcc dot gnu dot org
@ 2008-10-21 23:49 ` flameeyes at gentoo dot org
2008-10-27 1:50 ` pinskia at gcc dot gnu dot org
2010-01-17 10:23 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2008-10-21 23:49 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 757 bytes --]
------- Comment #6 from flameeyes at gentoo dot org 2008-10-21 23:48 -------
Created an attachment (id=16525)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16525&action=view)
Preprocessed test case
That's because I forgot to turn on -O2 :/
tc-htons-unrechable.c: In function âmy_htonsâ:
tc-htons-unrechable.c:5:10: warning: will never be executed
[-Wunreachable-code]
this is the warning that it throws.
--
flameeyes at gentoo dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #16524|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
` (5 preceding siblings ...)
2008-10-21 23:49 ` flameeyes at gentoo dot org
@ 2008-10-27 1:50 ` pinskia at gcc dot gnu dot org
2010-01-17 10:23 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-27 1:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2008-10-27 01:49 -------
This requires us to record that the macros came from system headers and so did
the expansion.
Also -Wunreachable-code is useless for most cases in general because of
inlining and such.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
GCC build triplet|x86_64-pc-linux-gnu |
GCC host triplet|x86_64-pc-linux-gnu |
GCC target triplet|x86_64-pc-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37881] -Wunreachable-code warns for system headers macros
2008-10-21 10:20 [Bug c/37881] New: -Wunreachable-code warns for system headers macros flameeyes at gentoo dot org
` (6 preceding siblings ...)
2008-10-27 1:50 ` pinskia at gcc dot gnu dot org
@ 2010-01-17 10:23 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-17 10:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-01-17 10:23 -------
-Wunreachable-code has been removed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37881
^ permalink raw reply [flat|nested] 9+ messages in thread