Bug 229723 - games/dungeoncrawl: unbreak on clang6 (use c++98) / unbreak on aarch64
Summary: games/dungeoncrawl: unbreak on clang6 (use c++98) / unbreak on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2018-07-12 11:56 UTC by Greg V
Modified: 2018-07-18 02:58 UTC (History)
0 users

See Also:


Attachments
dungeoncrawl.patch (376 bytes, patch)
2018-07-12 11:56 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2018-07-12 11:56:23 UTC
Created attachment 195074 [details]
dungeoncrawl.patch

C++17 mode by default implies -Wc++11-narrowing, which results in an error (itemname.cc:2788) on amd64, plus a ton of errors related to chars being unsigned on aarch64.

Add -std=c++98 to fix in general, and -fsigned-char to make it work with the assumption that chars are signed. (Though the game actually works on aarch64 even without -fsigned-char lol.)
Comment 1 commit-hook freebsd_committer 2018-07-18 02:55:40 UTC
A commit references this bug:

Author: jbeich
Date: Wed Jul 18 02:55:34 UTC 2018
New revision: 474830
URL: https://svnweb.freebsd.org/changeset/ports/474830

Log:
  games/dungeoncrawl: unbreak with Clang 6

  direct.cc:47:32: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
  static const char xcomp[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
                                 ^~
  describe.cc:216:28: warning: result of comparison of constant -2 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
      if (proprt[ RAP_FIRE ] < -2)
          ~~~~~~~~~~~~~~~~~~ ^ ~~

  PR:		229723
  Submitted by:	Greg V
  Reported by:	pkg-fallout

Changes:
  head/games/dungeoncrawl/Makefile
Comment 2 commit-hook freebsd_committer 2018-07-18 02:57:44 UTC
A commit references this bug:

Author: jbeich
Date: Wed Jul 18 02:56:42 UTC 2018
New revision: 474831
URL: https://svnweb.freebsd.org/changeset/ports/474831

Log:
  MFH: r474830

  games/dungeoncrawl: unbreak with Clang 6

  direct.cc:47:32: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing]
  static const char xcomp[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
                                 ^~
  describe.cc:216:28: warning: result of comparison of constant -2 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
      if (proprt[ RAP_FIRE ] < -2)
          ~~~~~~~~~~~~~~~~~~ ^ ~~

  PR:		229723
  Submitted by:	Greg V
  Reported by:	pkg-fallout
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/games/dungeoncrawl/Makefile
Comment 3 Jan Beich freebsd_committer 2018-07-18 02:58:30 UTC
Thanks. Landed with minor style fix.