public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61753] [4.7.2 regression] prototype for function does not match any in class error
Date: Tue, 08 Jul 2014 17:46:00 -0000 [thread overview]
Message-ID: <bug-61753-4-bm1z8Snuhs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61753-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61753
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|WAITING |NEW
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not valid syntax for a constructor:
const Rule::Rule(const ExprPtr e) :
expr(e)
{
}
The first const is ill-formed (and the second one is pointless, but harmless)
The error message could be better though, reduced:
class Rule {
Rule(int e);
};
const Rule::Rule(int e) { }
test.cc:5:7: error: prototype for ‘Rule::Rule(int)’ does not match any in class
‘Rule’
const Rule::Rule(int e) { }
^
test.cc:1:7: error: candidates are: Rule::Rule(const Rule&)
class Rule {
^
test.cc:2:3: error: Rule::Rule(int)
Rule(int e);
^
EDG has a better diagnostic:
"test.cc", line 5: error: return type may not be specified on a constructor
>From gcc-bugs-return-455905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 08 17:51:15 2014
Return-Path: <gcc-bugs-return-455905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26770 invoked by alias); 8 Jul 2014 17:51:14 -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 26104 invoked by uid 48); 8 Jul 2014 17:50:53 -0000
From: "dje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/61746] A line starting with /*// causes an error even if the /* is closed on the next line
Date: Tue, 08 Jul 2014 17:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: go
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dje at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ian at airs dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-61746-4-M6XVq8MYzw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61746-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61746-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: 2014-07/txt/msg00496.txt.bz2
Content-length: 544
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida746
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-07-08
CC| |ian at airs dot com
Ever confirmed|0 |1
--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
next prev parent reply other threads:[~2014-07-08 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 17:24 [Bug c++/61753] New: " shapero at uw dot edu
2014-07-08 17:46 ` redi at gcc dot gnu.org [this message]
2014-07-08 17:59 ` [Bug c++/61753] poor diagnostic for constructor definition that starts with 'const' redi at gcc dot gnu.org
2014-07-09 0:36 ` shapero at uw dot edu
2015-08-31 15:44 ` paolo.carlini at oracle dot com
2015-09-01 8:40 ` paolo 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-61753-4-bm1z8Snuhs@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).