Opened 7 years ago

Closed 5 years ago

#2950 closed defect (worksforme)

suppress tautological-constant-out-of-range-compare warning of clang++

Reported by: jinmei Owned by: UnAssigned
Priority: medium Milestone: Remaining BIND10 tickets
Component: build system Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 2 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


Build of BIND 10 fails with a recent version of clang++ if with
-Werror due to the following warning: warning: comparison of constant 4 with expression of type 'const isc::dns::Message::Section' is always false [-Wtautological-constant-out-of-range-compare]
    if (section >= MessageImpl::NUM_SECTIONS) {

We cannot skip such checks if we want to protect our code from buggy
application (either developed by ourselves or others). So I propose
just suppressing this warning globally in


Change History (5)

comment:1 Changed 7 years ago by jinmei

  • Milestone changed from Previous-Sprint-Proposed to Next-Sprint-Proposed

comment:2 Changed 7 years ago by muks

Is the fact that the enum is being compared for ordering? Will using switch, or rearranging code somehow help in such cases?

comment:3 Changed 7 years ago by muks

  • Estimated Difficulty changed from 0 to 2

comment:4 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:5 Changed 5 years ago by tomek

  • Resolution set to worksforme
  • Status changed from new to closed
  • Version set to git

Kea builds just fine with clang++ for a long time. Closing this ticket.

Note: See TracTickets for help on using tickets.