diff options
author | Fangrui Song <maskray@google.com> | 2021-10-20 14:22:43 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2021-10-20 14:22:43 -0700 |
commit | aa783f9a7b774d67487daa9376095738aef5cf88 (patch) | |
tree | 0b0cf18724a20cf479c34309b0a648c266128e98 /stdlib/strtoll.c | |
parent | d962cce139583c71fcbe9a05dc4c5fa68f72f655 (diff) | |
download | glibc-aa783f9a7b774d67487daa9376095738aef5cf88.tar.gz glibc-aa783f9a7b774d67487daa9376095738aef5cf88.tar.xz glibc-aa783f9a7b774d67487daa9376095738aef5cf88.zip |
linux: Fix a possibly non-constant expression in _Static_assert
According to C11 6.6p6, `const int` as an operand may not make up a constant expression. GCC -O0 errors: ../sysdeps/unix/sysv/linux/opendir.c:107:19: error: static_assert expression is not an integral constant expression _Static_assert (allocation_size >= sizeof (struct dirent64), -O2 -Wpedantic has a similar warning. See https://gcc.gnu.org/PR102502 for GCC's inconsistency. Use enum which is guaranteed to be a constant expression. This also makes the file compilable with Clang. Fixes: 4b962c9e859de23b461d61f860dbd3f21311e83a ("linux: Simplify opendir buffer allocation")
Diffstat (limited to 'stdlib/strtoll.c')
0 files changed, 0 insertions, 0 deletions