------- Comment #2 from gdr at integrable-solutions dot net 2005-12-08 22:25 ------- Subject: Re: New: POD structures can have
"mrs at apple dot com" <[EMAIL PROTECTED]> writes: | A user reported that this: | | mrs $ cat > t98.c | struct X { | int a, b; | X() : a(0), b(0) {} | }; | | static void f(const char *s, ...); | | int main() | { | X x; | f("foo!", x); | return 0; | } | | works on other C++ compilers (Metroworks), but on gcc: | | mrs $ ./g++ -B./ -c t98.c | t98.c: In function 'int main()': | t98.c:11: warning: cannot pass objects of non-POD type 'struct X' through | '...'; call will abort at runtime | | This, according the a reading of the standard is a POD type, no, really. :-) Are you saying "struct X" is a POD? -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25316