This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79919] New: Warning specifiedsend of method instead of correct line
- From: "amacleod at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Mar 2017 15:47:09 +0000
- Subject: [Bug c++/79919] New: Warning specifiedsend of method instead of correct line
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79919
Bug ID: 79919
Summary: Warning specifiedsend of method instead of correct
line
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: amacleod at redhat dot com
Target Milestone: ---
Just stumbled across as useful warning, but the line number didn't help since
it specified the end of the method instead of the line the error was actually
on.
Reduced to:
extern void foo ();
enum s { RS_INV, RS_I, RS_S };
class c {
enum s state;
int op2;
void dump ();
};
void c::dump ()
{
if (op2 && state == RS_I && state == RS_S)
foo();
}
produces:
./xg++ -B./ foo.c -O2 -c
foo.c: In member function ‘void c::dump()’:
foo.c:14:1: warning: ‘and’ of mutually exclusive equal-tests is always 0
}
^
This is from trunk as on Mar 3.