This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/30464] [regression] -Wconversion triggers warnings for deque<>::push_back()



------- Comment #10 from gdr at cs dot tamu dot edu  2007-01-17 11:09 -------
Subject: Re:  [regression] -Wconversion triggers warnings for
deque<>::push_back()

"pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org> writes:

| Gaby, any news about the signed <-> unsigned warning itself? Are we going to
| keep it or are we coming to the conclusion it's too noisy?

Hi Paolo,

  Here is the key element we should think about, and why I think this
specific warning is not useful.  GCC supports only 2s complement
targets.  Given that, I don't see what this "altering value"
diagnostoc is helping.   

  I consider that a conversion from T to U may alter value if a round
trip may give a different result back.  E.g.

Given
    U u = t;

the assertion

    assert (T(u) == t);

may fail for some value in T.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30464


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]