Re: [Development] 0 vs. NULL

2015-10-08 Thread Thiago Macieira
On Thursday 08 October 2015 13:01:50 René J.V. Bertin wrote: > > and I'm not entirely sure about NULL, for that matter (it might just > > expand to 0, at least in C, but perhaps not in C++). > > Given how NULL is usally defined as ((void*)0) or equivalent, there should > not be any issues in that

Re: [Development] 0 vs. NULL

2015-10-08 Thread René J . V . Bertin
On Thursday October 08 2015 11:12:35 Welbourne Edward wrote: > Perhaps I misunderstood ! I'm relatively new to Qt myself. Your email address suggested otherwise ;) > I'm not convinced I want to rely on that. > Some compilers might be better at it than others ... You'd probably better not thoug

Re: [Development] 0 vs. NULL

2015-10-08 Thread Welbourne Edward
>>> Did I simply hit a "feature" Qt won't ever encounter because it >>> doesn't use C (nor va_arg)? is what I was referring back to when I said: >> Well, it's nice to hear we don't use var-args. Perhaps I misunderstood ! I'm relatively new to Qt myself. On grep-ing code, I see we do in fact us

Re: [Development] 0 vs. NULL

2015-10-08 Thread René J . V . Bertin
On Thursday October 08 2015 09:52:14 Welbourne Edward wrote: > > A bit of a generic question, [...] about the preferred use of 0 instead of > > NULL. > > One of the habits of C++ that a C programmer always finds weird. Yeah, especially when they're used to being annoyed about all those "redunda

Re: [Development] 0 vs. NULL

2015-10-08 Thread André Somers
Op 8-10-2015 om 11:27 schreef René J.V. Bertin: > Hi, > > A bit of a generic question, for my personal education. I saw a comment in a > code review recently (one related to making Qt build on OS X 10.11, probably) > about the preferred use of 0 instead of NULL. > > I didn't realise at first why

Re: [Development] 0 vs. NULL

2015-10-08 Thread Welbourne Edward
> A bit of a generic question, [...] about the preferred use of 0 instead of > NULL. One of the habits of C++ that a C programmer always finds weird. > Now I remembered having to modify some of my own code to use NULL > instead of 0 to avoid crashing, on 64bit (capable) hardware. I cannot > reme

[Development] 0 vs. NULL

2015-10-08 Thread René J . V . Bertin
Hi, A bit of a generic question, for my personal education. I saw a comment in a code review recently (one related to making Qt build on OS X 10.11, probably) about the preferred use of 0 instead of NULL. I didn't realise at first why that remark surprised me somewhere. Now I remembered having