
Fixes #21650 --- Clang currently inserts an implicit `return 0;` in `main()` when compiling in `C89` mode, even though the `C89` standard doesn't require this behavior. This patch changes that behavior by emitting a warning instead of silently inserting the implicit return under `-pedantic`.
12 lines
191 B
C
12 lines
191 B
C
/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -Wno-strict-prototypes -Wmain-return-type %s
|
|
*/
|
|
|
|
/* expected-no-diagnostics */
|
|
|
|
void exit(int);
|
|
|
|
int main() {
|
|
if (1)
|
|
exit(1);
|
|
}
|