re PR middle-end/17544 (incorrect -Wunreachable-code warning for mains with a return...
authorSteven Bosscher <stevenb@suse.de>
Sat, 1 Jan 2005 16:15:23 +0000 (16:15 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Sat, 1 Jan 2005 16:15:23 +0000 (16:15 +0000)
commit43e05e45bcd3092ef7fb02e537ca7645607dbede
treec6d40e9cbaa9fa337df7a271539a709395f1c913
parent8e1d2e8278cc2bed80ad1a1564cee131996b6129
re PR middle-end/17544 (incorrect -Wunreachable-code warning for mains with a return statement)

* emit-rtl.c (add_insn_before): Fix comment typo.

PR middle-end/17544
* c-decl.c (finish_function): If compiling C99, annotate the
compiler generated return with the current file name and line 0.
* tree-cfg.c (remove_useless_stmts_warn_notreached): Only warn if
the source line is greater than 0.
(remove_bb): Likewise.

cp/
PR middle-end/17544
* decl.c (finish_function): Fix comment.  Annotate the compiler
generated return with the current file name and line 0.

testsuite/
* gcc.dg/20041231-1.C: New test.
* g++.dg/warn/Wunreachable-code-1.C: New test.

From-SVN: r92784
gcc/ChangeLog
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/emit-rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunreachable-code-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/20041231-1.c [new file with mode: 0644]
gcc/tree-cfg.c