coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build error caused by latest od commit


From: Pádraig Brady
Subject: Re: Build error caused by latest od commit
Date: Wed, 7 Feb 2024 11:14:22 +0000
User-agent: Mozilla Thunderbird

On 07/02/2024 03:57, Collin Funk wrote:
Hello, I ran into a build failure when compiling coreutils from
master. On FreeBSD amd64 14.0-RELEASE-p4 with clang version 16.0.6 and
no options given to ./configure I see the following error:

src/od.c:510:1: error: passing 'bfloat16' (aka '__bf16') to parameter of 
incompatible type 'float'
PRINT_FLOATTYPE (print_bfloat, bfloat16, ftoastr, FLT_BUFSIZE_BOUND)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/od.c:499:49: note: expanded from macro 'PRINT_FLOATTYPE'
                 FTOASTR (buf, sizeof buf, 0, 0, x);                     \
                                                 ^
src/od.c:487:7: note: expanded from macro 'PRINT_FIELDS'
       ACTION;                                                           \
       ^~~~~~
./lib/ftoastr.h:48:76: note: passing argument to parameter 'x' here
int  ftoastr (char *buf, size_t bufsize, int flags, int width,       float x);

This does not occur with GCC 12.2.0 where __bf16 is not supported. GCC
13.2.1 from FreeBSD ports where it is supported also seems to work
fine. Sorry for the lack of patch, I don't know much about the compiler
float types :(

Ah interesting. So clang 16 restricts promotion to float.
I've added and extra configure check for that and pushed.

thanks,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]