mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 23:54:16 +08:00
Add fake _Float16 type to enable the latest math.h on macOS
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
This commit is contained in:
parent
8c4e67380e
commit
a06c608625
8
tccgen.c
8
tccgen.c
@ -4709,8 +4709,16 @@ static int parse_btype(CType *type, AttributeDef *ad, int ignore_label)
|
||||
case TOK_COMPLEX:
|
||||
tcc_error("_Complex is not yet supported");
|
||||
case TOK_FLOAT:
|
||||
/* macOS SDK uses it in math.h
|
||||
fake the size and alignment
|
||||
*/
|
||||
u = VT_FLOAT;
|
||||
/* tcc_warning("_Float16 is not yet supported. Skipped.");
|
||||
I hope no one really uses it in the wild. */
|
||||
goto basic_type;
|
||||
case TOK_FLOAT16:
|
||||
u = VT_SHORT;
|
||||
|
||||
case TOK_DOUBLE:
|
||||
if ((t & (VT_BTYPE|VT_LONG)) == VT_LONG) {
|
||||
t = (t & ~(VT_BTYPE|VT_LONG)) | VT_LDOUBLE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user