Skip to content
Snippets Groups Projects
Commit ff87c937 authored by Dmitry Ivanov's avatar Dmitry Ivanov
Browse files

misc: fix clang-specific warnings in luajit's asserts

Apparently, clang 18 is not particularly happy about luajit's static
assert implementation:

```
In file included from tarantool/src/box/box.cc:38:
In file included from tarantool/src/lua/utils.h:47:
In file included from tarantool/third_party/luajit/src/lj_state.h:9:
tarantool/third_party/luajit/src/lj_obj.h:488:1: error: variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'? [-Werror,-Wvla-extension-static-assert]
  488 | LJ_STATIC_ASSERT(offsetof(Node, val) == 0);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tarantool/third_party/luajit/src/lj_def.h:370:71: note: expanded from macro 'LJ_STATIC_ASSERT'
  370 |   extern void LJ_ASSERT_NAME(__COUNTER__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1])
      |                                                                       ^~~~~~~~~~~
tarantool/third_party/luajit/src/lj_obj.h:488:18: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
  488 | LJ_STATIC_ASSERT(offsetof(Node, val) == 0);
      | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tarantool/src/trivia/util.h:273:33: note: expanded from macro 'offsetof'
  273 | #define offsetof(type, member) ((size_t) &((type *)0)->member)
      |                                 ^
tarantool/third_party/luajit/src/lj_def.h:370:72: note: expanded from macro 'LJ_STATIC_ASSERT'
  370 |   extern void LJ_ASSERT_NAME(__COUNTER__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1])
      |
```

Luckily, we can just mute this.

NO_DOC=<nothing interesting here>
NO_TEST=<tested during build time>
NO_CHANGELOG=<nothing interesting here>
parent e2a4deb5
Branches picodata-25.1
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment