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++/85011] GCC complains that 2 identical function prototypes are different


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-03-28
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
I'll confirm this as rejects-valid.  I didn't take the time to look it up in
the standard but since the non-template case below is accepted I would expect
the template case to be as well.  It doesn't appear to be a regression.

struct foo
{
  int x;

  auto f1() -> decltype (x);
};

auto foo::f1() -> decltype (this->x) {}

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