<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66186>66186</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Decision required for CWG GitHub Issue 422 on [basic.start.main]
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Eisenwave
</td>
</tr>
</table>
<pre>
See https://github.com/cplusplus/CWG/issues/422.
In short, it is currently unclear what constitutes "use" of the `main` function and Clang implements this very aggressively. It is the only compiler which flags `decltype(main)`.
My suggested solution for the issue in [[basic.start.main] p3](https://eel.is/c++draft/basic.start.main#3) is
```diff
The function main shall not be
-used
+odr-used
within the program.
```
This would invalidate the current behavior because `decltype(main)` is not odr-use.
Is there a strong reason for LLVM to flag `decltype(main)` or is the suggested solution acceptable?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U01v6zYQ_DXUZRFBoj6eedDh2a7TAMmpQXOmqJXEgiJVLmnD_74Q7SJJmzzAlkBCO7M7MyuJ9GQRO9bsWXPMZAyz891vmtBe5Bmz3g3X7g9EmENYiVU_GT8xfpp0mGOfK7cwflKribT9GT8d3h4ZP2miiNux5jxnxZEVP2_PJws0Ox8YP4AOoAlU9B5tMFeIVhmUHi6zDKCcpaBDDEjAOI-EjHNwI4QZgbXFIrVlbQFjtCpoZ0HaAQ5G2gn0shpc0AaCMGuCM_oryGnySKTPaK45PCXqDcpZcwXlllUb3Ki1mmE0cqKNZEBlwnVFxneJjwvWFp_mebkCxWlCCjgAORNTL6PzCTzJANpCUnffS9IqpyB9yBNec4S1Ys2R8d1neRFNrjf9FON7xveDl2Ng_PQ_BF5VjAvQdG-qLW6_QY_j7QpeZ3xXaSsCmqUxYF2AHm8fPUTC4Q7B927wHy7gosOsbRpo9W7ycsn_w3Y7vm5iX1w0A2h7lkYPMmAqu3sMPc7yrJ2HHpWMhN9qvLmz9Xfv5HOEknEeQQIF7-wEHiXdVX9-_vMFgksWfo_u_L_2f2GeVArXIHuDrDplQ1cNohIyw65sRd2IpuIimzusy3JsxI-hlbXo-7KVpZCC1yWKH2JsZaY7XvCqEGVV7JqGi7xuUFa8H3ssRCFEyeoCF6lNbsx5yZ2fshSXrm3LXZsZ2aOhtJacW7zcssQ437bUd1vNQx8nYnVhNAV6Rwk6GOyOqDRt43j8O2qPQ5Ln8PYIjzr8Hnt4Stmst6VK-fwinFn0pvvF3m-U99fD6t1fqMLH3U-D_BMAAP__qKhpkw">