public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25689]  New: missed diagnostic about assignment used as truth value.
@ 2006-01-06  9:45 pluto at agmk dot net
  2006-01-06 12:32 ` [Bug c++/25689] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 5+ messages in thread
From: pluto at agmk dot net @ 2006-01-06  9:45 UTC (permalink / raw)
  To: gcc-bugs

[ foo.cpp ]

struct Var {
    operator int() const;
    Var& operator = (int);
    bool operator == (int);
};
bool operator == (int, Var&);

void foo(Var var)
{
    if (var = 0);  // if (var.operator=(0))
}

[ foo.cpp.t03.gimple ]

void foo(Var) (var)
{
  bool retval.0;
  struct Var & D.1768;
  int D.1769;

  D.1768 = operator= (&var, 0);
  D.1769 = operator 1 (D.1768);
  retval.0 = D.1769 != 0;
}


-- 
           Summary: missed diagnostic about assignment used as truth value.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
 GCC build triplet: i686-pld-linux
  GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25689



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-22 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25689-4@http.gcc.gnu.org/bugzilla/>
2021-08-10  0:44 ` [Bug c++/25689] missed diagnostic about assignment used as truth value pinskia at gcc dot gnu.org
2022-02-09 17:24 ` zhaoweiliew at gmail dot com
2022-04-29  2:59 ` cvs-commit at gcc dot gnu.org
2022-07-22 13:54 ` ppalka at gcc dot gnu.org
2006-01-06  9:45 [Bug c++/25689] New: " pluto at agmk dot net
2006-01-06 12:32 ` [Bug c++/25689] " pinskia at gcc dot gnu dot org

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).