fpc boolean incompatible with clang _Bool
System Information
- Operating system: KDE neon Unstable Edition
- Processor architecture: x86-64
-
ppcx64
version:- 3.3.1 2e86cdb6
- 3.3.2 https://sourceforge.net/projects/freepascal/files/Linux/3.2.2/fpc-3.2.2.x86_64-linux.tar/download
- (both broken)
-
clang
version: 14.0.0-1ubuntu1.1 - Device: Computer
Steps to reproduce
- create file
myclib.c
:#include <stdio.h> void mycfunc(_Bool arg){ printf("number: %08x\n",arg?1u:0u); }
-
clang -O1 -shared -o libmyclib.so myclib.c
-O1
is important) - create file
prog.pas
:{$LINKLIB myclib} procedure mycfunc(arg:boolean);cdecl;external; begin mycfunc(false); mycfunc(true); end.
ppcx64 prog
LD_LIBRARY_PATH=. ./prog
What is the current bug behavior?
number: 00429d00 number: cbc9a701(line 2 different every time)
What is the expected (correct) behavior?
number: 00000000 number: 00000001
Edited by BZZZZ