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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Binary literals are flagged as a GNU extension even when compiling in C23 mode
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    C23 added binary literals into the standard, but currently, when compiling with `-std=c23 -Wpedantic`, the compiler emits a warning (`-Wgnu-binary-literal`) that they're a GNU extension.

## Reproducing the error

Compile the following program with `clang -std=c23 -Wpedantic`:

```c
int main() {
    return 0b0;
}
```

Here's that program in Compiler Explorer, compiled with Clang trunk: https://godbolt.org/z/Ezz6ox37x.

## Expected behaviour

The program should compile with no warnings.

## Possible solution

Don't enable `-Wgnu-binary-literal` as part of `-Wpedantic` when compiling as C23.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U01vqzoQ_TVmM0oEdvhasGiT8t7i6enqfqhrgwfwrbGRbZqkv_7KkPSmUStFQQwzx-ccn-HOyV4jViR9JOkh4rMfjK3-My1XPyZjXqLGiHO1pwy4ECigkZrbMyjp0XLlQGpvwA8IznMtuBWE7qGZPbSztai9OofCcUANrRknqaTu4Sj9ACSLN84Lwg4tZbB5nlBw7WVLsjiMBMx1Ai3gKL0DDkdudQAgtAjjz72eNyujzYXRMl2CH7gPEGdCc4vA4Z__fwGePGonjd6S-EDih8s_ZYQy-I6TNWJuA3w4G6019rZvv5JZPnZGKXMMrZM1veXju6RWcd3Dl8LYw4ejs3j9teu71B5GLnWQR0sg-eNaBwCw6GerIW5iwi5lkh_ucG7B_0WLhOZu9eLKU2rYX119Ok3KWLTB7ovVYhWyX1R4O-sXwh5g8H5ygTutCa17Ixqj_NbYntD6jdD66e0tMyeWnz4z9uk0YetDdHDgr9LMH1z9OeA7NzeYWYkrlZWJNtdLd5-BfzPOyUYhOKNmL42-7TkYTWjuATUPLV8nBriDiVsPplu7bq7sPrvcwZ6ybSQqJkpW8girJCvLrKAsyaOhSsqua7ss65quKdtiVzZZnPKuE7RIi5hjJCsaU5YkSRKnacHybYEJZqzLd2mbdk2RkV2MI5dqq9TrGFyOpHMzVjmNkzxSvEHlln2ldEkboTSsrq1C_6aZe0d2sZLOu78IXnq1LPk6kR7g8W6RuUXoFO97FEHj3cYAvqK-tyJkiTIYjcBotqq6i4n0w9xsWzMSWgcil8dmsuY3tp7QetHlCK0XaX8CAAD__ytqbyQ">