Bug 216357

Summary: games/frobtads and games/qtads: fail to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: kaiwang27, tcberner
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (kaiwang27)
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216215
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215861
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216046
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216051
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216052
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216056
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216058
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216072
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216074
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216075
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216076
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216159
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216176
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216194
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216197
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216198
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216199
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216200
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216203
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216206
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216211
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216213
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216214
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216216
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216217
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216218
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216221
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216222
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216227
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216228
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216233
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216234
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216235
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216253
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216354
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216355
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216356
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216358
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216615
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216617
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216618
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216619
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216620
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216621
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216622
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216623
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216624
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216626
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216632
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216633
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216634
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216635
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216636
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216637
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216638
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216639
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216640
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216641
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216642
Bug Depends on:    
Bug Blocks: 216008    
Attachments:
Description Flags
Patch for fixing build with clang 4.0
none
Patch for qtads. (fix build and upgrade to 2.1.7) none

Description Jan Beich freebsd_committer freebsd_triage 2017-01-21 19:19:05 UTC
tads3/vmtz.cpp:1985:30: error: ordered comparison between pointer and zero ('vmtz_trans *' and 'int')
            result->set(tcur > 0 ? tcur - 1 : tcur);
                        ~~~~ ^ ~

build log: http://sprunge.us/bbeQ
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-21 19:25:59 UTC
games/frobtads needs the same fix.

tads3/vmtz.cpp:1987:30: error: ordered comparison between pointer and zero ('vmtz_trans *' and 'int')
            result->set(tcur > 0 ? tcur - 1 : tcur);
                        ~~~~ ^ ~

build log: http://sprunge.us/PESC
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2017-01-21 20:26:15 UTC
It seems there is an updated version of this file:
https://github.com/realnc/qtads/blob/master/tads3/vmtz.cpp#L2049
Comment 3 kaiwang27 2017-01-31 22:22:28 UTC
Created attachment 179480 [details]
Patch for fixing build with clang 4.0

I think the upstream change found by Tobias should work.

Attached patch for fixing build with clang 4.0.
Comment 4 kaiwang27 2017-01-31 23:03:15 UTC
Created attachment 179482 [details]
Patch for qtads. (fix build and upgrade to 2.1.7)

Add another patch for qtads.

* Fix the build with clang 4.0 with the same patch
* Upgrade to 2.1.7
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-02-01 05:27:12 UTC
A commit references this bug:

Author: jbeich
Date: Wed Feb  1 05:26:09 UTC 2017
New revision: 432973
URL: https://svnweb.freebsd.org/changeset/ports/432973

Log:
  games/frobtads: unbreak with clang 4.0

  tads3/vmtz.cpp:1987:30: error: ordered comparison between pointer and zero ('vmtz_trans *' and 'int')
              result->set(tcur > 0 ? tcur - 1 : tcur);
                          ~~~~ ^ ~

  PR:		216357
  Reported by:	antoine (via exp-run)
  Submitted by:	kaiwang27@gmail.com (maintainer)

Changes:
  head/games/frobtads/Makefile
  head/games/frobtads/files/
  head/games/frobtads/files/patch-tads3_vmtz.cpp
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-02-01 05:27:14 UTC
A commit references this bug:

Author: jbeich
Date: Wed Feb  1 05:26:23 UTC 2017
New revision: 432974
URL: https://svnweb.freebsd.org/changeset/ports/432974

Log:
  games/qtads: unbreak with clang 4.0

  tads3/vmtz.cpp:1985:30: error: ordered comparison between pointer and zero ('vmtz_trans *' and 'int')
              result->set(tcur > 0 ? tcur - 1 : tcur);
                          ~~~~ ^ ~

  PR:		216357
  Reported by:	antoine (via exp-run)
  Submitted by:	kaiwang27@gmail.com (maintainer)

Changes:
  head/games/qtads/Makefile
  head/games/qtads/files/patch-tads3_vmtz.cpp
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-02-01 05:34:25 UTC
A commit references this bug:

Author: jbeich
Date: Wed Feb  1 05:30:00 UTC 2017
New revision: 432990
URL: https://svnweb.freebsd.org/changeset/ports/432990

Log:
  games/qtads: update to 2.1.7

  Changes:	https://github.com/realnc/qtads/compare/2.1.6...2.1.7
  PR:		216357
  Submitted by:	kaiwang27@gmail.com (maintainer)
  MFH:		2017Q1

Changes:
  head/games/qtads/Makefile
  head/games/qtads/distinfo
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-02-02 07:35:53 UTC
A commit references this bug:

Author: jbeich
Date: Thu Feb  2 07:34:59 UTC 2017
New revision: 433125
URL: https://svnweb.freebsd.org/changeset/ports/433125

Log:
  MFH: r432973 r432974

  games/frobtads, games/qtads: unbreak with clang 4.0

  tads3/vmtz.cpp:1987:30: error: ordered comparison between pointer and zero ('vmtz_trans *' and 'int')
              result->set(tcur > 0 ? tcur - 1 : tcur);
                          ~~~~ ^ ~

  PR:		216357
  Reported by:	antoine (via exp-run)
  Submitted by:	kaiwang27@gmail.com (maintainer)
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2017Q1/
  branches/2017Q1/games/frobtads/Makefile
  branches/2017Q1/games/frobtads/files/
  branches/2017Q1/games/qtads/Makefile
  branches/2017Q1/games/qtads/files/patch-tads3_vmtz.cpp
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-02-02 07:36:56 UTC
A commit references this bug:

Author: jbeich
Date: Thu Feb  2 07:36:39 UTC 2017
New revision: 433126
URL: https://svnweb.freebsd.org/changeset/ports/433126

Log:
  MFH: r432990

  games/qtads: update to 2.1.7

  Changes:	https://github.com/realnc/qtads/compare/2.1.6...2.1.7
  PR:		216357
  Submitted by:	kaiwang27@gmail.com (maintainer)
  Approved by:	ports-secteam (delphij)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/games/qtads/Makefile
  branches/2017Q1/games/qtads/distinfo