================
@@ -964,7 +964,7 @@ def err_main_global_variable :
def warn_main_redefined : Warning<"variable named 'main' with external linkage
"
"has undefined behavior">, InGroup<Main>;
def ext_main_used : Extension<
- "ISO C++ does not allow 'main' to be used by a program">, InGroup<Main>;
+ "expressions that refer to 'main' are an extension">, InGroup<Main>;
----------------
AaronBallman wrote:
```suggestion
"expressions that refer to 'main' are a Clang extension">, InGroup<Main>;
```
I think there's work to be done for full conformance here though. For example,
this DR clarified that the following code is valid, but we still diagnose it as
an extension:
```
int main() {}
decltype(main) maine;
```
https://godbolt.org/z/nn8rd483Y
https://github.com/llvm/llvm-project/pull/96168
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits