Summary: | app-arch/cpio-2.13-r3 - obstack.c: error: incompatible function pointer types initializing void | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://savannah.gnu.org/bugs/index.php?63349 | ||
Whiteboard: | fixed in 2.13-r5 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412 | ||
Attachments: |
emerge-info.txt
app-arch:cpio-2.13-r3:20221108-092752.log clang.tar.bz2 emerge-history.txt environment etc.portage.tar.bz2 logs.tar.bz2 temp.tar.bz2 Change C11 _Noreturn into __attribute__((noreturn)) in obstack.c |
Description
Toralf Förster
![]() Created attachment 828957 [details]
emerge-info.txt
Created attachment 828959 [details]
app-arch:cpio-2.13-r3:20221108-092752.log
Created attachment 828961 [details]
clang.tar.bz2
Created attachment 828963 [details]
emerge-history.txt
Created attachment 828965 [details]
environment
Created attachment 828967 [details]
etc.portage.tar.bz2
Created attachment 828969 [details]
logs.tar.bz2
Created attachment 828971 [details]
temp.tar.bz2
Created attachment 838639 [details, diff]
Change C11 _Noreturn into __attribute__((noreturn)) in obstack.c
Changing '_Noreturn' on line 329 to __attribute_noreturn__ on the declaration of print_and_abort at obstack.c works for me.
Seems Clang doesn't treat C11 _Noreturn as equivalent to __attribute__((noreturn)), while GCC does.
(In reply to Carlos from comment #9) > Created attachment 838639 [details, diff] [details, diff] > Change C11 _Noreturn into __attribute__((noreturn)) in obstack.c > > Changing '_Noreturn' on line 329 to __attribute_noreturn__ on the > declaration of print_and_abort at obstack.c works for me. > > Seems Clang doesn't treat C11 _Noreturn as equivalent to > __attribute__((noreturn)), while GCC does. Could you send the patch upstream to the Savannah link I posted, but also, does this work fine with GCC? I wonder if we'll need to use a configure check to make this palatable to upstream. Thanks! The patch compiles on both my clang and my gcc environment. Both with LTO. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e82c66c6494159d59fe2d771f8eec43748dd869b commit e82c66c6494159d59fe2d771f8eec43748dd869b Author: Sam James <sam@gentoo.org> AuthorDate: 2023-01-03 03:28:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-01-03 03:33:42 +0000 app-arch/cpio: fix build w/ clang 16 Closes: https://bugs.gentoo.org/880373 Signed-off-by: Sam James <sam@gentoo.org> .../{cpio-2.13-r4.ebuild => cpio-2.13-r5.ebuild} | 3 ++- ...2.13-wincompatible-function-pointer-types.patch | 23 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) |