summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-04-29 10:42:45 -0700
committerYamaArashi <shadow962@live.com>2016-04-29 10:42:45 -0700
commita0f147d45bfb4d45da82baa07fea47fa7bf35d7b (patch)
treeed0d9846e4ba90cf3416f2f9eac8e8b8d444efda /gcc/c-decl.c
parent4553c7e8fe69c50c201bc39dac1be088004babc2 (diff)
revert some changes
Diffstat (limited to 'gcc/c-decl.c')
-rwxr-xr-xgcc/c-decl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5578e9a..a710701 100755
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -7042,6 +7042,10 @@ finish_function (nested)
setjmp_protect_args ();
}
+ if (!strcmp(IDENTIFIER_POINTER(DECL_NAME(fndecl)), "main")
+ && TYPE_MAIN_VARIANT(TREE_TYPE(TREE_TYPE(fndecl))) != integer_type_node)
+ pedwarn_with_decl(fndecl, "return type of `%s' is not `int'");
+
/* Generate rtl for function exit. */
expand_function_end (input_filename, lineno, 0);