public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66161] New: gcc silent about type incompleteness in error message
Date: Fri, 15 May 2015 14:32:00 -0000 [thread overview]
Message-ID: <bug-66161-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66161
Bug ID: 66161
Summary: gcc silent about type incompleteness in error message
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tromey at gcc dot gnu.org
Target Milestone: ---
This source is distilled from a more complicated real-world
case that arose in https://bugzilla.mozilla.org/show_bug.cgi?id=1165184
class Base { };
class Incomplete; // : public Base
template<typename T>
Base* blah_cast(T *arg) { return arg; }
Base* function(Incomplete *arg)
{
return blah_cast(arg);
}
Compiling this yields:
pokyo. g++ -c s.cc
s.cc: In instantiation of ‘Base* blah_cast(T*) [with T = Incomplete]’:
s.cc:10:23: required from here
s.cc:6:34: error: cannot convert ‘Incomplete*’ to ‘Base*’ in return
Base* blah_cast(T *arg) { return arg; }
^
In this case it is obvious that Incomplete is an incomplete type.
However, in the real-world code this is far from obvious.
I think it would be handy if gcc printed something like
"note: type 'Incomplete' is incomplete at this point; missing include?".
>From gcc-bugs-return-486339-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 15 14:32:13 2015
Return-Path: <gcc-bugs-return-486339-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 77685 invoked by alias); 15 May 2015 14:32:13 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 77637 invoked by uid 48); 15 May 2015 14:32:08 -0000
From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66136] AArch64 geniterators.sh relies on GNU sed syntax, causing build failure on FreeBSD and probably Mac
Date: Fri, 15 May 2015 14:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rearnsha at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-66136-4-A0ah4jKFT0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66136-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66136-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01179.txt.bz2
Content-length: 796
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf136
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-05-15
Ever confirmed|0 |1
--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
According to:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/sed.html
[In a replacement] the meaning of a '\' immediately followed by any character
other than '&', '\', a digit, or the delimiter character used for this command,
is unspecified.
So I think that rules out all the normal escaped characters.
next reply other threads:[~2015-05-15 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 14:32 tromey at gcc dot gnu.org [this message]
2015-05-15 15:32 ` [Bug c++/66161] " redi at gcc dot gnu.org
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=bug-66161-4@http.gcc.gnu.org/bugzilla/ \
--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: link
Be 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).