Commit 0d528058 by Richard Stallman

(finish_function): Fix braino validating ret type of main.

From-SVN: r1583
parent 77612f06
...@@ -5793,7 +5793,7 @@ finish_function (nested) ...@@ -5793,7 +5793,7 @@ finish_function (nested)
#ifdef DEFAULT_MAIN_RETURN #ifdef DEFAULT_MAIN_RETURN
if (! strcmp (IDENTIFIER_POINTER (DECL_NAME (fndecl)), "main")) if (! strcmp (IDENTIFIER_POINTER (DECL_NAME (fndecl)), "main"))
{ {
if (TREE_TYPE (fndecl) != integer_type_node) if (TREE_TYPE (TREE_TYPE (fndecl)) != integer_type_node)
warning_with_decl (fndecl, "return type of `%s' is not `int'"); warning_with_decl (fndecl, "return type of `%s' is not `int'");
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment