This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67017] Mixing init-declarator for variables and functions in declaration with auto type-specifier
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 26 Jul 2015 23:17:28 +0000
- Subject: [Bug c++/67017] Mixing init-declarator for variables and functions in declaration with auto type-specifier
- Auto-submitted: auto-generated
- References: <bug-67017-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67017
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-07-26
Ever confirmed|0 |1
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Anders Granlund from comment #3)
> > I think that is because type deduction for return types of functions was
> > introduced in c++14.
Yes, I understand why they reject it in C++11 mode, my point was that they all
consistently accept it in C++14 mode.
> I noticed an interesting thing however. Consider this program:
>
> auto i = 0, f();
> auto f() { return false; }
> int main() {}
>
> Clang accepts it, but GCC rejects it (I didn't try EDG).
EDG accepts that too.