This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/63585] no warning


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;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]