[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p2 requirements (PR #101853)
Mital Ashok via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 4 02:59:47 PDT 2024
================
@@ -990,6 +990,9 @@ def warn_main_redefined : Warning<"variable named 'main' with external linkage "
"has undefined behavior">, InGroup<Main>;
def ext_main_used : Extension<
"referring to 'main' within an expression is a Clang extension">, InGroup<Main>;
+def err_invalid_linkage_specification : Extension<
+ "invalid linkage specification "
+ "'extern \"%select{C|C++}0\"'">;
----------------
MitalAshok wrote:
This doesn't say why it's invalid. `'main' cannot have linkage specification 'extern "C(++)"'`?
https://github.com/llvm/llvm-project/pull/101853
More information about the cfe-commits
mailing list