<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/138963>138963</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"error: function-like macro '__alignof__' is not defined" when __alignof__ used in #if condition
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dlech
</td>
</tr>
</table>
<pre>
Test case:
```c
#if __alignof__(long long) < 8
#endif
```
Result:
```console
$ clang test.c
test.c:2:5: error: function-like macro '__alignof__' is not defined
2 | #if __alignof__(long long) < 8
| ^
1 error generated.
```
Expectation:
`__allignof__()` should evaluate to a compile-time integer constant and therefore be usable in a `#if` condition, just like `sizeof()`, etc.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykUs2OnDwQfJrm0hrkaX4GDhz49tt5gCj3kbEb8MZjj2yzm-TpIzOrzUTJIVKQhY3cXV1VlIzRLI55gOY_aP4v5JZWHwZtWa3F5PW34TPHhEpGhmoEsa9W3JfKH1SZGS8Xac3i_Hy5AHXWuwXzC6hHqJ6wuxey02Z-BLjjfeK42fQHeO-it7z31qisdAsmjqlUCGK8n6AaCaqxgWpEDsGHfJg3p5Lx7mDNF8arVMEj0OkXkic0EZ1PqHk2jjWIERGREE5P-NeicH9yy743zyDG450ILuw4yMS6_F3y89cbqyQzyUfdeeLDSKAeWoFx9ZvVyK_SbjIxJo8Slb_ejOVDMldG4xIvHDA7lqRLKJ3GtHLg2QfGiXGLcrK5ECVmFllgxlbeabPToCd82WLC3TNoRTTf2c8fLPI9J1UWeqh0X_Wy4OF4qtu2OR5bKtahq6emnsXE06y7meteEFE391J0c3tUVJiBBDWiEScSDdVU9r2epayqrp06qTRBLfgqjS2tfb2WPiyFiXHj4Vh1fVsVVk5s4x5UIsdvuN8CUc5tGHLTYdqWCLWwJqb4EyaZZHkAon9LCBG-rewec4FbZJ1dvSfmw81iC3ZYU7rF_HvpDHReTFq3qVT-CnTO1N63wy34F1YJ6LwLikDnd8WvA_0IAAD__8VpHOQ">