This reverts commit f6dff93641.
This diagnostic is also in the -Wcomment group, which is in the -Wall
group, so the diagnostic is enabled in a wider context than GCC does.
That turns out to be disruptive for the Linux kernel builds still using
-std=gnu89 because the kernel requires C source files to start with //
comments: https://kernel.org/doc/html/v5.18-rc5/process/license-rules.html#license-identifier-syntax
6 lines
212 B
C
6 lines
212 B
C
// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify
|
|
|
|
int f(int restrict);
|
|
|
|
void main(void) {} // expected-warning {{return type of 'main' is not 'int'}} expected-note {{change return type to 'int'}}
|