Opened 5 years ago

Closed 5 years ago

#3642 closed defect (fixed)

warning on CentOS 6.6 32bit

Reported by: wlodekwencel Owned by: wlodekwencel
Priority: low Milestone: Kea0.9.1beta
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


Another warning treated as error. Fix/workaround needed.

  CXX    libkea_dhcp___la-classify.lo
cc1plus: warnings being treated as errors
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algo.h: In constructor β€˜isc::dhcp::ClientClasses::ClientClasses(const std::string&)’:
/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algo.h:2178: error: array subscript is above array bounds
make[5]: *** [libkea_dhcp___la-classify.lo] Error 1

Full log:


Change History (4)

comment:1 Changed 5 years ago by tomek

  • Milestone changed from Kea-proposed to Kea0.9.1
  • Priority changed from medium to low

comment:2 Changed 5 years ago by stephen

  • Owner set to stephen
  • Status changed from new to accepted

comment:3 Changed 5 years ago by stephen

  • Owner changed from stephen to wlodekwencel
  • Status changed from accepted to assigned

I think that this is a problem with the compiler's optimiser. The compilation command is:

g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib
-I/opt/log4cplus/include -DOS_LINUX -I../../../ext/asio -I../../../ext/coroutine
-DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wnon virtual-dtor -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -Werror -fPIC -Wno-missing-field-initializers
-g -O2 -MT libkea_dhcp___la-classify.lo

Removing the "-O2" solves the problem.

The version of the g++ compiler on this machine is

gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

... which is an old version.

As the file compiles successfully on my Ubuntu 12.04 box using gcc version 4.6.3, and the latest version of the compiler available on the GNU web site is 4.9.2 (released on 2014-10-30), I suggest we upgrade the compiler.

comment:4 Changed 5 years ago by wlodekwencel

  • Resolution set to fixed
  • Status changed from assigned to closed

I tried first with gcc 4.7.2 and error didn't occur.
All Jenkins projects updated.

Note: See TracTickets for help on using tickets.