------- Additional Comments From steven at gcc dot gnu dot org 2004-12-23 01:19 ------- Look, no hands (or testing): Index: cp/decl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v retrieving revision 1.1346 diff -u -3 -p -r1.1346 decl.c --- cp/decl.c 22 Dec 2004 03:34:53 -0000 1.1346 +++ cp/decl.c 23 Dec 2004 01:19:29 -0000 @@ -10631,12 +10631,19 @@ finish_function (int flags) { if (DECL_MAIN_P (current_function_decl)) { - /* Make it so that `main' always returns 0 by default. */ + tree stmt; + + /* Make it so that `main' always returns 0 by default (or + 1 for VMS). */ #if VMS_TARGET finish_return_stmt (integer_one_node); #else finish_return_stmt (integer_zero_node); #endif + /* Hack. We don't want the middle-end to warn that this + return is unreachable, so put the statement on the + special line 0. */ + annotate_with_file_line (stmt, input_filename, 0); } /* Finish dealing with exception specifiers. */
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17544