Bug 248995 - devel/avarice: current llvm 11.0.0 fallout
Summary: devel/avarice: current llvm 11.0.0 fallout
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: Joerg Wunsch
Keywords: patch
Depends on:
Reported: 2020-08-29 20:19 UTC by Craig Leres
Modified: 2020-09-05 21:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (joerg)

patch (1.59 KB, patch)
2020-08-29 20:19 UTC, Craig Leres
leres: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 2020-08-29 20:19:01 UTC
Building on FreeBSD 13.0-CURRENT (r364847) produces two fatal errors:

    --- devdescr.o ---
    devdescr.cc:2251:2: error: type 'gdb_io_reg_def_type []' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
    devdescr.cc:2251:2: note: insert an explicit cast to silence this issue
            static_cast<bool>(     )
    devdescr.cc:2375:2: error: type 'gdb_io_reg_def_type []' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
    devdescr.cc:2375:2: note: insert an explicit cast to silence this issue
            static_cast<bool>(     )
    devdescr.cc:2375:2: warning: address of array 'atmega32c1_io_registers' will always evaluate to 'true' [-Wpointer-bool-conversion]
    devdescr.cc:2251:2: warning: address of array 'atmega32m1_io_registers' will always evaluate to 'true' [-Wpointer-bool-conversion]
    2 warnings and 2 errors generated.

The problem appears to be two instances of static initialization of the wrong field. These look like straight up bugs to me that the newer compiler with better warning detects.

I also filed an upstream bug report:

Comment 1 Craig Leres freebsd_committer 2020-08-29 20:19:27 UTC
Created attachment 217623 [details]
Comment 2 Joerg Wunsch freebsd_committer 2020-08-31 05:32:53 UTC
Going to roll a new AVaRICE release - it's long overdue anyway.
Comment 3 commit-hook freebsd_committer 2020-09-05 21:43:58 UTC
A commit references this bug:

Author: joerg
Date: Sat Sep  5 21:43:21 UTC 2020
New revision: 547759
URL: https://svnweb.freebsd.org/changeset/ports/547759

  Update AVaRICE port to 2.14

  Among others, this fixes the breakage reported in PR 248995.

  PR:		248995

Comment 4 Joerg Wunsch freebsd_committer 2020-09-05 21:44:56 UTC
Upgraded the port to AVaRICE 2.14 in r547759.

Thanks for taking the time to analyze the compile error anyway, but pushing the upstream files forward seemed to be the much better solution to me.