Page 1 of 1

[zscript] [clang] Build failures

Posted: Fri Nov 18, 2016 7:56 am
by kevans91
Hi,

Hitting the following build failure on Clang:
Spoiler: Excerpt from https://jenkins.kyle-evans.net/jenkins/job/ZDoom/45/consoleText
Seems to have started here: https://github.com/rheit/zdoom/commit/a ... ba0aae86a7

Re: [zscript] [clang] Build failures

Posted: Fri Nov 18, 2016 8:28 am
by Graf Zahl
Urgh. This is one of the more annoying traits of Visual Studio that it silently converts any zero constant to a null pointer...

Re: [zscript] [clang] Build failures

Posted: Fri Nov 18, 2016 4:20 pm
by kevans91
Eww, that's particularly ill-behaved. =( This is [fixed], by the way. =)

Re: [zscript] [clang] Build failures

Posted: Fri Nov 18, 2016 4:22 pm
by Graf Zahl
Actually, it's not. Assigning 0 to a pointer is perfectly legal in C++, NULL is nothing different. Actually it's Clang which is, strictly spoken, wrong here, it's understandable why but it's still adding semantics to something that cannot be made part of the standard.

Re: [zscript] [clang] Build failures

Posted: Fri Nov 18, 2016 9:06 pm
by kevans91
Graf Zahl wrote:Actually, it's not. Assigning 0 to a pointer is perfectly legal in C++, NULL is nothing different. Actually it's Clang which is, strictly spoken, wrong here, it's understandable why but it's still adding semantics to something that cannot be made part of the standard.
Yeah, I suppose it just feels wrong to make the logical leap from false -> 0 -> pointer value. On the other hand, I also feel dirty about NULL = (void*)0, so fair enough. =)

This re-surfaced again, by the way, in https://github.com/rheit/zdoom/commit/3 ... 0bca7368e4
Spoiler: Excerpt from https://jenkins.kyle-evans.net/jenkins/job/ZDoom/lastBuild/consoleText