BIND 10 #837: multiple include of initialized static constant members
BIND 10 Development
do-not-reply at isc.org
Wed Apr 6 14:17:32 UTC 2011
#837: multiple include of initialized static constant members
-------------------------------------+------------------------------------
Reporter: fdupont | Type: defect
Status: new | Priority: major
Milestone: | Component: Unclassified
Keywords: | Sensitive: 0
Estimated Number of Hours: 0 | Add Hours to Ticket: 0
Billable?: 1 | Total Hours: 0
Internal?: 0 |
-------------------------------------+------------------------------------
In edns.h:
class EDNS {
!///
static const uint8_t SUPPORTED_VERSION = 0;
!///
}
Each time the edns.h file is included this gives a new
EDNS::SUPPORTED_VERSION
symbol so linking raises "multiple defined" errors.
There are two ways to fix it:
- play with an #ifdef so only the initializing form in included in
edns.cc
- move the initialization to edns.cc
I prefer the second way but there are still some choices:
- keep the value in .h in a comment
- what to do for this line is edns_unittest.cc:
const uint8_t EDNS::SUPPORTED_VERSION;
(I'd like to remove it)?
--
Ticket URL: <http://bind10.isc.org/ticket/837>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list