[Bug 238284] math/z3: compile warnings on non-x86 systems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jun 1 23:06:29 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238284

            Bug ID: 238284
           Summary: math/z3: compile warnings on non-x86 systems
           Product: Ports & Packages
           Version: Latest
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: arrowd at FreeBSD.org
          Reporter: jfc at mit.edu
          Assignee: arrowd at FreeBSD.org
             Flags: maintainer-feedback?(arrowd at FreeBSD.org)

Building math/z3 on arm64 generates a lot of warnings, some of which are real
bugs.  z3 is required by llvm-devel.

src/util/statistics.cpp
c++: warning: argument unused during compilation: '-msse'
[-Wunused-command-line-argument]
c++: warning: argument unused during compilation: '-msse2'
[-Wunused-command-line-argument]

The above is repeated for every file.  My ARM CPU does not have SSE or SSE2.  I
suspect the culprit is scripts/mk_util.py function test_fpmath, which requests
SSE flags unless they make the compiler return a non-zero exit code.

--- api/z3_replayer.o ---
../src/api/z3_replayer.cpp:172:19: warning: result of comparison of constant -1
with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
            if (c == EOF) {
                ~ ^  ~~~
../src/api/z3_replayer.cpp:417:19: warning: result of comparison of constant -1
with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
            if (c == EOF)
                ~ ^  ~~~

--- parsers/util/scanner.o ---
../src/parsers/util/scanner.cpp:65:35: warning: result of comparison of
constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
        if (delimiter == ch || -1 == ch) {
                               ~~ ^  ~~
../src/parsers/util/scanner.cpp:76:16: warning: result of comparison of
constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
        if (ch == EOF) {
            ~~ ^  ~~~
../src/parsers/util/scanner.cpp:191:24: warning: result of comparison of
constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
                if (ch == EOF) {
                    ~~ ^  ~~~
../src/parsers/util/scanner.cpp:249:35: warning: result of comparison of
constant -1 with expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
        if (ch == delimiter || ch == EOF) {
                               ~~ ^  ~~~
4 warnings generated.

../src/smt/mam.cpp:97:36: warning: result of comparison of constant -1 with
expression of type 'char' is always false
[-Wtautological-constant-out-of-range-compare]
            if (m_lbl2hash[lbl_id] == -1) {
                ~~~~~~~~~~~~~~~~~~ ^  ~~
../src/smt/mam.cpp:108:35: warning: result of comparison of constant -1 with
expression of type 'const char' is always true
[-Wtautological-constant-out-of-range-compare]
                if (m_lbl2hash[i] != -1) {
                    ~~~~~~~~~~~~~ ^  ~~

These say the programmer never imagined that type char could be unsigned.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list