<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/85491>85491</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            The option -Wno-main does not work.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yujiezhang125
      </td>
    </tr>
</table>

<pre>
    We compiled this file like this: `clang -Wno-main -Wno-error=main main.c`.

```C
int main(char x) { return 0; }
```

We got this error.

```
main.c:1:5: error: first parameter of 'main' (argument count) must be of type 'int'
    1 | int main(char x) {
      |     ^
1 error generated.
```

We expect no errors or warnings.  Gcc with the same flags gives no errors or warnings.

The version was clang version 19.0.0git (https://github.com/llvm/llvm-project.git 047b2b241defcad79a6ac0fec9cda092bac0a922).

The use case is a bare-metal application with a custom `_start`.  We want to pass customized arguments to `main`, which are not int and strings.  We do not want to use `-ffreestanding` because we want some builtins.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlN2OrDYMx58m3FiDQvgaLriY3e30BSrNZWWCgZwDCUrMztnz9FVgRnvUditVQgmJ7eQX-y9jCGa0RK0oX0T5luDGk_Ptx_bN0M8J7ZipMulc_9HeCLRbVjNTDzyZAIOZCWbznfalyC8gKqlntCOcbtadFjT2-CPvnRf5274Th1SLSqZCvgl5eYyVPL7XY20s755CnfWEHn4I1YCoX8ATb96CFPkLiPrtb9G_HnkjGB0frDvBv194LB9U-SUT-aWMj3lAX2AwPjCs6HEhJg9uAKHqA64Goc7ox20hy6DdZjmCLltg6Ci68sdK0d9ES31cBgCQgahf4atnfvrB7rfP5W_HdnawwUiWPDL16X9ngX6spBmsO-ICOA939NbYMaQAv2sNd8MT8EQQcCEYZhwDjOadwhdRv97wx0TwTj4YZ-GOAQ4JPHeyJpWpHA3HTE3Ma1SKUFehrqPhaetS7RahrvP8_pxOq3ffSHMao2RRd6pTRdbToLGvG6xQy4F0o3uUjepQS2yUEqr5B9UWCDQGAhMAoUNPp4UYZ8B1nY1G3pHj0xH0FtgtUcJ_BkbPUaAAN4I7WgZ2sGIIDy_zk3p4Vj1Eo6jkXsZKCvUK98noCdATWMd7jdH2ENg_Mn4j6N1uex4eSUUlT8PgiQKj7Y0dRSWhI43ReH-ABLcQdJuZ2diQJn2b903eYEJtVmeyLGVZn5OprSqV57JD7Itadrque5XXmS7k0HeVLprEtEqqQuZZJWVZZedU5hn250ZjU2Yoy1oUkhY0cxorkjo_JiaEjdpzWTRZMmNHc9ibhlKW7rAbhVKxh_h2r2K3jUEUcjaBw-cpbHimNlbHrXv-P3tF73a9Mdyd_54mm5_b_ycYoa47RxDqunP-FQAA___qxINJ">