<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 1:51 AM Sven Barth via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Dmitry Boyarintsev <<a href="mailto:skalogryz.lists@gmail.com" target="_blank">skalogryz.lists@gmail.com</a>> schrieb am Fr., 12. Okt. 2018, 02:07:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Oct 11, 2018 at 4:16 PM Jonas Maebe <<a href="mailto:jonas@freepascal.org" rel="noreferrer" target="_blank">jonas@freepascal.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">However, the Objective-C BOOL type does not map to _Bool on x86-64, but <br>
to signed char. And values of that type indeed do need to (sign) <br>
extended. <br></blockquote><div><br></div><div>Should use of ByteBool resolve the problems for ObjC mapped headers for the current version of the compiler? </div><div>is "ByteBool" an alias for Boolean, or is it forcefully "char" sized for x86_64 ABI?</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Even Boolean has the correct size of 1 Byte. The difference is the value of True: For Boolean its always 1, for ByteBool it's "not 0".</div></div></blockquote><div><br></div><div>But it feels like "signed chars" are treated differently, where the value would extended to the remaining bits of the register.</div><div>That's why I was wondering if "ByteBool" would be passed differently than "Boolean" on 64-bit.</div><div><br></div><div>Here's a similar discussion</div><div><a href="https://stackoverflow.com/questions/31267325/bool-with-64-bit-on-ios">https://stackoverflow.com/questions/31267325/bool-with-64-bit-on-ios</a><br></div><div><br></div><div>It actually states that true _Bool is only used for 64-bit ARM and no other targets.</div><div><br></div><div>So, I'm wondering if it's actually a compiler issue or headers issue.</div><div>and can ByteBool be used as a substitute for signed char.</div><div><br></div><div>thanks,</div><div>Dmitry</div></div></div></div>