Issue 138963
Summary "error: function-like macro '__alignof__' is not defined" when __alignof__ used in #if condition
Labels new issue
Assignees
Reporter dlech
    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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to