[cfe-users] __builtin_constant_p(), __builtin_expect() and __builtin_types_compatible_p() and __has_builtin()

2019-08-09 Thread Chris Hall via cfe-users
I find that __builtin_constant_p() works as expected, but __has_builtin(constant_p) denies it ! Similarly __builtin_expect() and __builtin_types_compatible_p() ! Can I just assume these are all supported by all version of clang ? Chris ___ cfe-user

Re: [cfe-users] __builtin_constant_p(), __builtin_expect() and __builtin_types_compatible_p() and __has_builtin()

2019-08-09 Thread Matthew Fernandez via cfe-users
> On Aug 9, 2019, at 05:23, Chris Hall via cfe-users > wrote: > > > I find that __builtin_constant_p() works as expected, but > __has_builtin(constant_p) denies it ! I believe you need __has_builtin(__builtin_constant_p). > > Similarly __builtin_expect() and __builtin_types_compatible_p()

Re: [cfe-users] __builtin_constant_p(), __builtin_expect() and __builtin_types_compatible_p() and __has_builtin()

2019-08-09 Thread Chris Hall via cfe-users
On 09/08/2019 15:00, Matthew Fernandez wrote: On Aug 9, 2019, at 05:23, Chris Hall via cfe-users wrote: I find that __builtin_constant_p() works as expected, but __has_builtin(constant_p) denies it ! I believe you need __has_builtin(__builtin_constant_p). Ah :-(  So you do... sorry... I ha

Re: [cfe-users] __builtin_constant_p(), __builtin_expect() and __builtin_types_compatible_p() and __has_builtin()

2019-08-09 Thread Richard Smith via cfe-users
On Fri, 9 Aug 2019 at 10:32, Chris Hall via cfe-users < cfe-users@lists.llvm.org> wrote: > On 09/08/2019 15:00, Matthew Fernandez wrote: > >> On Aug 9, 2019, at 05:23, Chris Hall via cfe-users wrote: > >> > >> I find that __builtin_constant_p() works as expected, but > >> __has_builtin(constant_p)

Re: [cfe-users] Should clang++ -g produce debugging info for all types?

2019-08-09 Thread Bob Eastbrook via cfe-users
On Mon, Aug 5, 2019 at 1:36 PM David Blaikie wrote: > Does it work with gdb? It works with gdb. More info: g++ & gdb -- works, even without debuginfo for libstdc++ clang++ & gdb -- works g++ & lldb -- works clang++ & lldb -- fails I now notice these warnings in lldb after installing the debug

Re: [cfe-users] Should clang++ -g produce debugging info for all types?

2019-08-09 Thread David Blaikie via cfe-users
On Fri, Aug 9, 2019 at 6:03 PM Bob Eastbrook wrote: > On Mon, Aug 5, 2019 at 1:36 PM David Blaikie wrote: > > > Does it work with gdb? > > It works with gdb. More info: > > g++ & gdb -- works, even without debuginfo for libstdc++ > ^ for std::string I'd expect this. For std::fstream, I expect

Re: [cfe-users] __builtin_constant_p(), __builtin_expect() and __builtin_types_compatible_p() and __has_builtin()

2019-08-09 Thread Matthew Fernandez via cfe-users
> On Aug 9, 2019, at 14:58, Richard Smith via cfe-users > wrote: > > On Fri, 9 Aug 2019 at 10:32, Chris Hall via cfe-users > mailto:cfe-users@lists.llvm.org>> wrote: > On 09/08/2019 15:00, Matthew Fernandez wrote: > >> On Aug 9, 2019, at 05:23, Chris Hall via cfe-users wrote: > >> > >> I find