From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31568 invoked by alias); 8 Dec 2005 22:25:47 -0000 Received: (qmail 31556 invoked by alias); 8 Dec 2005 22:25:46 -0000 Date: Thu, 08 Dec 2005 22:25:00 -0000 Message-ID: <20051208222546.31555.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/25316] POD structures can have In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gdr at integrable-solutions dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-12/txt/msg00885.txt.bz2 List-Id: ------- 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" 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