Changes between Initial Version and Version 2 of Ticket #5658


Ignore:
Timestamp:
Jul 18, 2013, 8:27:50 AM (9 years ago)
Author:
Mateusz Loskot
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5658

    • Property Owner changed from Andrew Sutton to Sebastian Redl
    • Property Cc gcc 4.0 mateusz@… added; gcc 4.0 removed
    • Property Component graphproperty_tree
  • Ticket #5658 – Description

    initial v2  
    11compiling e.g libs/graph/src/graphml.cpp warns ...
    2 -----
     2
     3{{{
    34/boost/property_tree/detail/rapidxml.hpp: In function `size_t boost::property_t
    45ree::detail::rapidxml::internal::get_index(Ch) [with Ch = char]':
     
    2526./boost/property_tree/detail/rapidxml.hpp:317: warning: comparison is always fal
    2627se due to limited range of data type
    27 ---------
     28}}}
     29
    2830Caused by the template:
     31
     32{{{
    2933template<class Ch>
    3034        inline size_t get_index(const Ch c)
     
    3741            return c;
    3842        }
    39 ----------
     43}}}
     44
    4045How to avoid ?
    4146Just specify additionally a user defined implementation
    4247of get_index for the "char" type :
    43  
     48
     49{{{
    4450        inline size_t get_index(const char c)
    4551        {
     
    5763            return c;
    5864        }
    59 ---------
     65}}}
     66
    6067I checked the code size (using gcc4.0) : same
    6168and the difference of the ASM code: "same"
    6269
    63 
     70{{{
    647114972c14972
    6572<       cmpq    (%r15), %rdi
     
    889515487c15487
    8996---
     97}}}