public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19966] New: Misleading message "must take exactly one argument"
@ 2005-02-15 13:24 reichelt at gcc dot gnu dot org
2005-02-15 13:25 ` [Bug c++/19966] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-15 13:24 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet causes a bogus error message:
==============================
struct A
{
static operator int();
};
==============================
bug.cc:3: error: 'static A::operator int()' must be a nonstatic member function
bug.cc:3: error: 'static A::operator int()' must take exactly one argument
The first part is ok, but the second part is bogus, as the operator
(once made non-static) will take no argument. Well, the this-pointer
could be counted as an argument, but this is nevertheless confusing
for the user. Especially, since the second error message will indeed
go away if one adds a parameter.
--
Summary: Misleading message "must take exactly one argument"
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: diagnostic, monitored
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/19966] Misleading message "must take exactly one argument"
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
@ 2005-02-15 13:25 ` pinskia at gcc dot gnu dot org
2005-03-11 18:27 ` pcarlini at suse dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-15 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-15 01:18 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-15 01:18:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/19966] Misleading message "must take exactly one argument"
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
2005-02-15 13:25 ` [Bug c++/19966] " pinskia at gcc dot gnu dot org
@ 2005-03-11 18:27 ` pcarlini at suse dot de
2005-03-17 14:39 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2005-03-11 18:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2005-03-11 18:27 -------
Maybe I can fix this one too...
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/19966] Misleading message "must take exactly one argument"
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
2005-02-15 13:25 ` [Bug c++/19966] " pinskia at gcc dot gnu dot org
2005-03-11 18:27 ` pcarlini at suse dot de
@ 2005-03-17 14:39 ` cvs-commit at gcc dot gnu dot org
2005-03-17 14:44 ` cvs-commit at gcc dot gnu dot org
2005-03-17 14:46 ` pcarlini at suse dot de
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17 14:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-17 14:38 -------
Subject: Bug 19966
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2005-03-17 14:37:10
Modified files:
gcc/cp : ChangeLog cp-tree.h decl.c
Log message:
2005-03-17 Paolo Carlini <pcarlini@suse.de>
PR c++/19966
* cp-tree.h (grok_op_properties): Change return type to void.
* decl.c (grok_op_properties): Return early - don't check the
arity - in case of a static member or an operator that cannot
be non-member; tidy a bit.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4664&r2=1.4665
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1110&r2=1.1111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1378&r2=1.1379
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/19966] Misleading message "must take exactly one argument"
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-03-17 14:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17 14:44 ` cvs-commit at gcc dot gnu dot org
2005-03-17 14:46 ` pcarlini at suse dot de
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17 14:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-17 14:40 -------
Subject: Bug 19966
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2005-03-17 14:39:16
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/overload: operator2.C
Log message:
2005-03-17 Paolo Carlini <pcarlini@suse.de>
PR c++/19966
* g++.dg/overload/operator2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5177&r2=1.5178
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/overload/operator2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/19966] Misleading message "must take exactly one argument"
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-03-17 14:44 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17 14:46 ` pcarlini at suse dot de
4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2005-03-17 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2005-03-17 14:42 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19966
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-03-17 14:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-15 13:24 [Bug c++/19966] New: Misleading message "must take exactly one argument" reichelt at gcc dot gnu dot org
2005-02-15 13:25 ` [Bug c++/19966] " pinskia at gcc dot gnu dot org
2005-03-11 18:27 ` pcarlini at suse dot de
2005-03-17 14:39 ` cvs-commit at gcc dot gnu dot org
2005-03-17 14:44 ` cvs-commit at gcc dot gnu dot org
2005-03-17 14:46 ` pcarlini at suse dot de
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).