[Bug c++/14318] sizeof() does too much

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Fri Feb 27 12:34:00 GMT 2004


------- Additional Comments From giovannibajo at libero dot it  2004-02-27 12:34 -------
Niall,

I don't follow you. When you're trying to assign a Foo to a "long int" there 
are three different valid conversion sequences. You can either go through "long 
long int", through "double" or through "char". What's your expectation? There 
is no perfect match, and all the three types are then implicitally convertable 
to "long int" which is the final type.

This has nothing to do with implementation, if you ask Boost.TypeTraits you 
will find the same behaviour. 

As for the sizeof() warning about passing non-POD through '...', I already 
fixed it some weeks ago, you should probably update your compiler.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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



More information about the Gcc-bugs mailing list