comment bogus main warning even with -Wno-main.
This commit is contained in:
parent
34c4557d93
commit
a057e5253b
2
gnu/dist/gcc/c-decl.c
vendored
2
gnu/dist/gcc/c-decl.c
vendored
@ -7022,6 +7022,7 @@ finish_function (nested)
|
|||||||
if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl)))
|
if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl)))
|
||||||
!= integer_type_node)
|
!= integer_type_node)
|
||||||
{
|
{
|
||||||
|
#ifndef __NetBSD__
|
||||||
/* You would expect the sense of this test to be the other way
|
/* You would expect the sense of this test to be the other way
|
||||||
around, but if warn_main is set, we will already have warned,
|
around, but if warn_main is set, we will already have warned,
|
||||||
so this would be a duplicate. This is the warning you get
|
so this would be a duplicate. This is the warning you get
|
||||||
@ -7030,6 +7031,7 @@ finish_function (nested)
|
|||||||
usual. */
|
usual. */
|
||||||
if (! warn_main)
|
if (! warn_main)
|
||||||
pedwarn_with_decl (fndecl, "return type of `%s' is not `int'");
|
pedwarn_with_decl (fndecl, "return type of `%s' is not `int'");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user