Bug 285494 - stable/14: "ISO C99 and later do not support implicit function declarations" build error after recent (Mon, 17 Mar 2025) sound related commits (33529d6ad44d - 4ed0ca91a309)
Summary: stable/14: "ISO C99 and later do not support implicit function declarations" ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.2-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Christos Margiolis
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-03-18 08:00 UTC by Ale
Modified: 2025-03-18 16:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ale 2025-03-18 08:00:10 UTC
After successfully building world+kernel at git 6207ca7b76b0, I updated the source tree to 64610df59348, but the build is now failing with the following error:

cc -target x86_64-unknown-freebsd14.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin  -O2 -pipe -fno-common -I/usr/src/sys  -fPIE -g -gz=zlib -MD  -MF.depend.pcm_read_write.pcm_read_write.o -MTpcm_read_write.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-mismatch  -Qunused-arguments -Wno-cast-align -c /usr/src/tests/sys/sound/pcm_read_write.c -o pcm_read_write.o
In file included from /usr/src/tests/sys/sound/pcm_read_write.c:24:
/usr/src/sys/dev/sound/pcm/pcm.h:196:3: error: call to undeclared function '__assert_unreachable'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  196 |                 __assert_unreachable();
      |                 ^
/usr/src/sys/dev/sound/pcm/pcm.h:324:3: error: call to undeclared function '__assert_unreachable'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  324 |                 __assert_unreachable();
      |                 ^
/usr/src/sys/dev/sound/pcm/pcm.h:371:3: error: call to undeclared function '__assert_unreachable'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  371 |                 __assert_unreachable();
      |                 ^
/usr/src/sys/dev/sound/pcm/pcm.h:373:1: error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type]
  373 | }
      | ^
4 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/src/tests/sys/sound
Comment 1 Ale 2025-03-18 16:48:21 UTC
It seems that the commit 235fe911df59 on stable/14 "include: add a userland version of __assert_unreachable" fixed the build.
I think that the PR could be closed.