BIND 10 #2009: const uint8_t {aka const unsigned char}' inside { } is ill-formed in C++11
BIND 10 Development
do-not-reply at isc.org
Thu May 31 05:14:51 UTC 2012
#2009: const uint8_t {aka const unsigned char}' inside { } is ill-formed in C++11
-------------------------------------+-------------------------------------
Reporter: jreed | Owner: muks
Type: | Status: reviewing
defect | Milestone:
Priority: | Sprint-20120612
medium | Resolution:
Component: | Sensitive: 0
Unclassified | Sub-Project: DNS
Keywords: | Estimated Difficulty: 4
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by muks):
Replying to [comment:7 jinmei]:
> The change (basically) looks okay, but I'm afraid it's not so obvious
why we
> need to do that, so please add some comments about why. I don't
> think I need to check the comment - please add whatever you think
> makes sense, and just merge it.
I've added this comment now:
{{{
+ // Splitting msg_len below performs something called a 'narrowing
+ // conversion' (conversion of uint16_t to uint8_t). C++0x (and GCC
+ // 4.7) requires explicit casting when a narrowing conversion is
+ // performed. For reference, see 8.5.4/6 of n3225.
}}}
> One note: why was 20a21a87777944fea10cf615b0b54d6e96df00ae included in
> the branch? It doesn't seem to be related to the topic of this ticket.
It isn't related. This is why it's prefixed with [master]. It was 'found'
during work on this ticket, so I just checked it into this branch instead
of directly in master.
> Another note: we should kill this stuff anyway and migrate to the
> socket session module. And, for that reason, I don't necessarily
> think we need a changelog entry for it. But if you think it's worth
> mentioning, please do so.
I'll skip the ChangeLog entry for this.
> Final note: I've found this:
> http://stackoverflow.com/questions/4434140/narrowing-conversions-in-c0x-
is-it-just-me-or-does-this-sound-like-a-breakin
This was helpful as a reference to write the comment above.
--
Ticket URL: <http://bind10.isc.org/ticket/2009#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list