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

    <tr>
        <th>Summary</th>
        <td>
            [avr] Built-in macro __flash clobbers namespace of the application
        </td>
    </tr>

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

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

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

<pre>
    Identifiers like `address_space` live in the namespace of the application, thus the implementation (compiler in this case) should avoid them whenever possible. C code like following is completely fine and supposed to compile:

```none
#define address_space 1
const __flash int xxx;
```
The problem is that `__flash` is built-in defined as, here from a pre-processed source file with `-dM`:
```none
#define __flash __attribute__((address_space(1)))
```
where the correct definition would read:
```none
#define __flash __attribute__((__address_space__(1)))
```
Notice that identifier `__address_space__` is in the namespace of the implementation, thus the application is not supposed to mess with it.



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVE2P2yAQ_TX2BW2E8Uecgw_dXa3UQ3vq3QI8jmkxWICT3X_fASfbzardVqqEbDMT3rx584iww0v3eQAT1KjAeaLVDyBZQ_kwOPC-9wuXgHtMnIAoQ8IExPAZUoLYMQX4smgleVDWZOwBQ6tPcTUvGmZETymSsVbaeVEa3AalPJHcQ8YOxE921QPhJ6uGeHYm5wkMnPCni_VeCQ078kCkHWAjOVqt7VmZI4koNlYKoF_IqAwSMgPx64InAdEsuZTNyk8Zfczo9dnQbRlr4BJi5QAbxFsFSLGlpTU-kL4fNfcT9hDI8_NzVt6_w9u231CBxVlkPkeOYeIhSns5HUXFqFiVDneoxlYWFfBRwgkctujsTDhiwB3iSGSDeW9Xh4RGbIecVZgi5N3wJVYt_6WvK_m-5yE4JdYAfY-TwXU7dNYWOJjL-l1_50Qyzlla50CGrQeVZn1O43TAh_-mhaG3xFL4L9S-2qAkbJKrV3tv6r8H2-bwJ2vfWvjG3W9cHxGMDTeeQyC_TUiF3Y3t0jOHrmiafVuzoqzzoSuHQ3ngeVBBQ5fV9_zksvqR3F_9MXPp7KtMUlsh4oX96C7mq9PdFMLi4wzYE64j8lnFDu8DbrQ-XV_RYN9xhLhV3q-AJnyq27au86lrq6oopGjrhoo9E7Spy1FU7Z42tKJtvc81F6B9JJ0xZuBMEgR-YwO56hhlrCjontGiLusd9lvuAapDJSQitFlFYeZK7yKPnXXH3HWJkliPHpNa-eB_JTn-GRwNJI0iPl_DZF3nF4fXERUReareJfY_AZD3k4U">