Skip to content
Snippets Groups Projects
Commit 43e05e45 authored by Steven Bosscher's avatar Steven Bosscher Committed by Steven Bosscher
Browse files

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
parent 8e1d2e82
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment