Description
Jan Beich
![]() Upstream fix uses nullptr but the port predates -std=c++11, so we need to use NULL except it doesn't work. NULL is expanded to __null which is not a pointer. Why? jsopcode.cpp:6070:45: error: ordered comparison between pointer and zero ('char *' and 'long') return QuoteString(&sprinter, s, quote) >= NULL; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ Created attachment 178609 [details]
Fix quote() failures
$ cat >a.cc
int main(void)
{
void *p = (void *)0xdeadbeef;
return !(p >= 0);
}
$ c++ a.cc
a.cc:4:14: error: ordered comparison between pointer and zero ('void *' and 'int')
return !(p >= 0);
~ ^ ~
1 error generated.
A commit references this bug: Author: jbeich Date: Fri Jan 13 01:42:46 UTC 2017 New revision: 431335 URL: https://svnweb.freebsd.org/changeset/ports/431335 Log: lang/spidermonkey170: unbreak with clang 4.0 Fix quoting failure handling in JSOP_CALLPROP and JSOP_STRING. jsopcode.cpp:6070:45: error: ordered comparison between pointer and zero ('char *' and 'int') return QuoteString(&sprinter, s, quote) >= 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ PR: 215861 Regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3 Obtained from: upstream (only the specific fix) Approved by: portmgr blanket MFH: 2017Q1 (changes existing behavior) Changes: head/lang/spidermonkey170/Makefile head/lang/spidermonkey170/files/patch-bug1012971 head/lang/spidermonkey24/Makefile head/lang/spidermonkey24/files/patch-bug1012971 A commit references this bug: Author: jbeich Date: Thu Jan 19 05:12:03 UTC 2017 New revision: 431842 URL: https://svnweb.freebsd.org/changeset/ports/431842 Log: MFH: r431335 lang/spidermonkey170: unbreak with clang 4.0 Fix quoting failure handling in JSOP_CALLPROP and JSOP_STRING. jsopcode.cpp:6070:45: error: ordered comparison between pointer and zero ('char *' and 'int') return QuoteString(&sprinter, s, quote) >= 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ PR: 215861 Regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3 Obtained from: upstream (only the specific fix) Approved by: portmgr blanket Approved by: ports-secteam (junovitch) Changes: _U branches/2017Q1/ branches/2017Q1/lang/spidermonkey170/Makefile branches/2017Q1/lang/spidermonkey170/files/patch-bug1012971 branches/2017Q1/lang/spidermonkey24/Makefile branches/2017Q1/lang/spidermonkey24/files/patch-bug1012971 |