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 c++/14318] sizeof() does too much


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-27 03:32 -------
ICC 6.0 fails too so I do not know:
pr14318.cc
pr14318.cc(5): warning #493: the type "long long" is nonstandard
          long long int data;     // Works fine if is "long int" or "short int" etc
               ^

pr14318.cc(47): error: more than one conversion function from "Foo" to "long" applies:
            function "Foo::operator long long &()"
            function "Foo::operator double()"
            function "Foo::operator bool()"
          a=f;
            ^

pr14318.cc(35): error: more than one conversion function from "Foo" to "unsigned long" applies:
            function "Foo::operator long long &()"
            function "Foo::operator double()"
            function "Foo::operator bool()"
          enum { value=sizeof(impl::test(impl::makeFrom()))==sizeof(char) };
                                         ^
          detected during instantiation of class "convertible<to, from> [with to=unsigned long, 
from=Foo]" at line 52

compilation aborted for pr14318.cc (code 2)

-- 


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


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