-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Missing '-Wreturn-type' warning for 'main' having no return statement in C89 mode #21650
Copy link
Copy link
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-negativeWarning doesn't fire when it shouldWarning doesn't fire when it shouldgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-negativeWarning doesn't fire when it shouldWarning doesn't fire when it shouldgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Type
Fields
Give feedbackNo fields configured for issues without a type.
Extended Description
Clang does not emit "control reaches end of non-void function [-Wreturn-type]" warning for 'main' having no return statement in C89 mode (-std=c89, gnu89).
Clang adds implicit-return-zero in C89 mode. But, since the C89 standard does not require it, wouldn't it be better to emit warning?