https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59950

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
   Last reconfirmed|2015-03-19 00:00:00         |2016-3-18
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |4.9.3, 5.3.0, 6.0

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The current top of 6.0 trunk still issues the bogus diagnostic.  Confirming
also with prior versions.

$ cat t.c && /build/gcc-trunk-bootstrap/gcc/xgcc -B
/build/gcc-trunk-bootstrap/gcc -S -Wall -Wextra -Wpedantic -xc++ v.c
struct S { int a [1]; };

struct S f (void);

void g (void)
{
    int* p = f ().a;
    int *q = &f ().a [0];

    (void)p;
    (void)q;
}

v.c:3:27: error: taking address of temporary [-fpermissive]
  int n = f(&(Foo() = Foo()));
                           ^

Reply via email to