This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14318] sizeof() does too much
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 03:32:27 -0000
- Subject: [Bug c++/14318] sizeof() does too much
- References: <20040227032625.14318.s_gccbugzilla@nedprod.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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