<div dir="auto"><div dir="auto"><br></div><div dir="auto">On Tue, Dec 17, 2024, 9:08 PM Florian Weimer <<a href="mailto:fweimer@redhat.com" target="_blank" rel="noreferrer">fweimer@redhat.com</a>> wrote:</div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* H. J. Lu:<br>
<br>
> Change _Bool to bool to silence clang++ error:<br>
><br>
> $ cat c.cc<br>
><br>
> int<br>
> foo ()<br>
> {<br>
> return CPU_FEATURE_PRESENT (SSE2);<br>
> }<br>
> $ clang++ -c -std=c++98 c.cc<br>
> In file included from c.cc:1:<br>
> In file included from /usr/include/sys/platform/x86.h:25:<br>
> /usr/include/bits/platform/features.h:31:19: error: unknown type name '_Bool'<br>
> 31 | static __inline__ _Bool<br>
> | ^<br>
> In file included from c.cc:1:<br>
> /usr/include/sys/platform/x86.h:33:19: error: unknown type name '_Bool'<br>
> 33 | static __inline__ _Bool<br>
> | ^<br>
> /usr/include/sys/platform/x86.h:46:19: error: unknown type name '_Bool'<br>
> 46 | static __inline__ _Bool<br>
> | ^<br>
> 3 errors generated.<br>
> $<br>
<br>
GCC has this in <stdbool.h>:<br>
<br>
/* Supporting _Bool in C++ is a GCC extension. */<br>
#define _Bool bool<br>
<br>
So I'd suggest to change the commit message to say that we are no longer<br>
relying on a GCC extension.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">Something like</div><div dir="auto"><br></div><div dir="auto">Drop the GCC extension by changing _Bool to bool to silence clang++ error.</div><div dir="auto"><br></div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The change itself is fine, <stdbool.h> is already included.<br>
<br>
Thanks,<br>
Florian<br>
<br><br>
</blockquote></div><div data-smartmail="gmail_signature">H.J.</div></div>