This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63585] no warning
- From: "maxim.prohorenko at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Oct 2014 07:46:59 +0000
- Subject: [Bug c++/63585] no warning
- Auto-submitted: auto-generated
- References: <bug-63585-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63585
--- Comment #1 from ÐÐÐÑÐÐ ÐÑÐÑÐÑÐÐÐÐ <maxim.prohorenko at gmail dot com> ---
int f (double x)
{
if (x > 0 || x < 0)
return 1;
// ok - warn
}
struct value
{
double x;
int operator== (const value &a)
{
if (a.x < x || a.x > x)
return 0;
// no warn ??
}
};
int main (int argc, char **argv)
{
value a, b;
int bb = 1.;
if (bb == f (1.) || bb == 2.5)
return 1;
if (bb == 2.)
return 2;
bb = bb;
return 0;
return a == b;
}