public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: papadopo@sources.redhat.com, at@sources.redhat.com, shfj@sources.redhat.com, cea@sources.redhat.com, fr@sources.redhat.com To: gcc-gnats@gcc.gnu.org Subject: c++/9658: compiler accepts invalid code Date: Tue, 11 Feb 2003 10:26:00 -0000 [thread overview] Message-ID: <20030211102109.10123.qmail@sources.redhat.com> (raw) >Number: 9658 >Category: c++ >Synopsis: compiler accepts invalid code >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Tue Feb 11 10:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Dimitri Papadopoulos >Release: gcc-3.2.2 >Organization: >Environment: Solaris 8 (7/01) >Description: Sun and SGI compilers emit an error on the attached code: $ CC -V CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-12 2002/12/16 $ CC -c foo.cc "foo.cc", line 2: Error: Cannot use int* to initialize int**. 1 Error(s) detected. $ $ CC -version MIPSpro Compilers: Version 7.3.1.3m $ CC -c foo.cc cc-1140 CC: ERROR File = foo.cc, Line = 2 A value of type "int *" cannot be used to initialize an entity of type "int **" . int **foo = new (int*)[33]; ^ ... $ The GNU compiler doesn't. The Sun engineers insist this is not legal code. >How-To-Repeat: $ g++ -Wall -c foo.c $ >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="foo.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="foo.cc" aW50IG1haW4oKSB7CiAgIGludCAqKmZvbyA9IG5ldyAoaW50KilbMzNdOwp9Cg==
next reply other threads:[~2003-02-11 10:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-11 10:26 papadopo, at, shfj, cea, fr [this message] 2003-02-14 20:58 bangerth
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=20030211102109.10123.qmail@sources.redhat.com \ --to=papadopo@sources.redhat.com \ --cc=at@sources.redhat.com \ --cc=cea@sources.redhat.com \ --cc=fr@sources.redhat.com \ --cc=gcc-gnats@gcc.gnu.org \ --cc=shfj@sources.redhat.com \ /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).