[libc-commits] [libc] [libc] Use __attribute__((__nothrow__)) for __NOEXCEPT in C (PR #114653)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Tue Dec 17 12:22:31 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/12510

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcUniStd.WriteAndReadBackTest
[       OK ] LlvmLibcUniStd.WriteAndReadBackTest (345 us)
[ RUN      ] LlvmLibcUniStd.WriteFails
[       OK ] LlvmLibcUniStd.WriteFails (5 us)
[ RUN      ] LlvmLibcUniStd.ReadFails
[       OK ] LlvmLibcUniStd.ReadFails (4 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[1428/1559] Linking CXX executable libc/test/src/unistd/libc.test.src.unistd.rmdir_test.__build__
[1429/1559] Building C object libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o 
/usr/bin/clang -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/libc/include -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wall -Werror -MD -MT libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o -MF libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o.d -o libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
STDBIT_STUB_FUNCTION(stdc_leading_zeros, 0xA)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:20:44: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_uc(unsigned char x) __NOEXCEPT {                        \
                                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:23:45: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_us(unsigned short x) __NOEXCEPT {                       \
                                            ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:26:43: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_ui(unsigned int x) __NOEXCEPT {                         \
                                          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:29:44: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_ul(unsigned long x) __NOEXCEPT {                        \
                                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:32:50: note: expanded from macro 'STDBIT_STUB_FUNCTION'
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcUniStd.WriteAndReadBackTest
[       OK ] LlvmLibcUniStd.WriteAndReadBackTest (345 us)
[ RUN      ] LlvmLibcUniStd.WriteFails
[       OK ] LlvmLibcUniStd.WriteFails (5 us)
[ RUN      ] LlvmLibcUniStd.ReadFails
[       OK ] LlvmLibcUniStd.ReadFails (4 us)
Ran 3 tests.  PASS: 3  FAIL: 0
[1428/1559] Linking CXX executable libc/test/src/unistd/libc.test.src.unistd.rmdir_test.__build__
[1429/1559] Building C object libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o 
/usr/bin/clang -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/libc/include -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wall -Werror -MD -MT libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o -MF libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o.d -o libc/test/include/CMakeFiles/libc.test.include.stdbit_c_test.__unit__.__build__.dir/stdbit_test.c.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
STDBIT_STUB_FUNCTION(stdc_leading_zeros, 0xA)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:20:44: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_uc(unsigned char x) __NOEXCEPT {                        \
                                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:23:45: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_us(unsigned short x) __NOEXCEPT {                       \
                                            ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:26:43: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_ui(unsigned int x) __NOEXCEPT {                         \
                                          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:29:44: note: expanded from macro 'STDBIT_STUB_FUNCTION'
  unsigned FUNC_NAME##_ul(unsigned long x) __NOEXCEPT {                        \
                                           ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/__llvm-libc-common.h:57:35: note: expanded from macro '__NOEXCEPT'
#define __NOEXCEPT __attribute__((__nothrow__))
                                  ^
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_test.c:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:38:1: error: GCC does not allow '__nothrow__' attribute in this position on a function definition [-Werror,-Wgcc-compat]
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/include/stdbit_stub.h:32:50: note: expanded from macro 'STDBIT_STUB_FUNCTION'

```

</details>

https://github.com/llvm/llvm-project/pull/114653


More information about the libc-commits mailing list