public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "p dot vestjens at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class Date: Tue, 13 Nov 2007 13:38:00 -0000 [thread overview] Message-ID: <20071113133844.13890.qmail@sourceware.org> (raw) In-Reply-To: <bug-32402-14720@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from p dot vestjens at gmail dot com 2007-11-13 13:38 ------- Okay. First of all the code causing the problems isn't actually my own code. It is used in the Connexis middleware layer of IBM's Rational Rose Real-Time application. The reproduce.cpp file was created by IBM's support department to reproduce the problem. They claim that the file compiles with the GNU 3.2 compiler but not with the GNU 3.4.4 and 4.1.0 compilers. I'm using GNU 4.1.1 which also doesn't compile the code, but WindRiver's Tornado 2 GNU 2.7.2 and the MS Visual Studio 6 compiler do. The problem seems to lie in the abundant use of parentheses: - "list = new (pure(*[3]));" => does not compile - "list = new (pure*[3]);" => compiles - "list = new pure(*[3]);" => does not compile - "list = new pure*[3];" => compiles So, the only question still relevant to me is whether the original construction is valid C++ code according to the ISO C++ standard. I tried verifying this using the grammar printed in Stroustrup's "C++ Programming language (third edition" but did not quite succeed. I guess grammatically it is ok, but semantically the GCC compiler interprets the construction differently from its previous version(s). How do we determine if the original construction is correct, both grammatically and semantically? If it isn't valid, IBM should fix their code. If it is, there might be a bug in GCC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402
next prev parent reply other threads:[~2007-11-13 13:38 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-06-19 14:45 [Bug c++/32402] New: " p dot vestjens at gmail dot com 2007-06-19 14:47 ` [Bug c++/32402] " p dot vestjens at gmail dot com 2007-11-12 15:06 ` gcc at waisse dot org 2007-11-12 15:42 ` gcc at waisse dot org 2007-11-12 19:41 ` zackw at panix dot com 2007-11-13 13:38 ` p dot vestjens at gmail dot com [this message] [not found] <bug-32402-4@http.gcc.gnu.org/bugzilla/> 2010-10-28 17:21 ` redi at gcc dot gnu.org 2010-10-28 17:30 ` redi at gcc dot gnu.org 2010-10-28 17:44 ` redi at gcc dot gnu.org 2010-10-30 11:47 ` redi at gcc dot gnu.org 2010-10-31 7:34 ` mark at tibanne dot com 2010-10-31 11:31 ` redi at gcc dot gnu.org 2010-10-31 11:59 ` gcc at waisse dot org 2010-10-31 12:42 ` redi at gcc dot gnu.org 2014-08-10 8:47 ` paolo.carlini at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20071113133844.13890.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).