From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113633 invoked by alias); 28 Apr 2015 17:47:26 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 113582 invoked by uid 48); 28 Apr 2015 17:47:22 -0000 From: "drew.dormann at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65919] New: Regression - GCC 5.1 with options "-g -std=c++14" fails to compile multiple lambdas used as default function parameters Date: Tue, 28 Apr 2015 17:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: drew.dormann at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02439.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65919 Bug ID: 65919 Summary: Regression - GCC 5.1 with options "-g -std=3Dc++14" fails to compile multiple lambdas used as default function parameters Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: drew.dormann at gmail dot com Target Milestone: --- The following program compiles with GCC 4.9, but will not compile using GCC= 5.1 Command: g++ -std=3Dc++14 -g TEST.cpp Source: #include struct TestClass { static void do_things( std::function first =3D []{}, std::function second =3D []{} ); }; int main() { TestClass::do_things(); } Output: TEST.cpp:12:1: error: =E2=80=98static void std::_Function_base::_Base_manager<_Functor>::_M_init_functor(std::_Any_dat= a&, _Functor&&, std::false_type) [with _Functor =3D TestClass::; std::false_type =3D std::integral_constant]=E2=80=99 conflicts= with a previous declaration } ^ In file included from TEST.cpp:1:0: /usr/include/c++/5/functional:1786:2: note: previous declaration =E2=80=98s= tatic void std::_Function_base::_Base_manager<_Functor>::_M_init_functor(std::_Any_dat= a&, _Functor&&, std::false_type) [with _Functor =3D TestClass::; std::false_type =3D std::integral_constant]=E2=80=99 _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) ^ /usr/include/c++/5/functional:1786:2: note: a later -fabi-version=3D (or = =3D0) avoids this error with a change in mangling TEST.cpp:12:1: error: =E2=80=98static void std::_Function_base::_Base_manager<_Functor>::_M_destroy(std::_Any_data&, std::false_type) [with _Functor =3D TestClass::; std::false_type = =3D std::integral_constant]=E2=80=99 conflicts with a previous dec= laration } ^ In file included from TEST.cpp:1:0: /usr/include/c++/5/functional:1724:2: note: previous declaration =E2=80=98s= tatic void std::_Function_base::_Base_manager<_Functor>::_M_destroy(std::_Any_data&, std::false_type) [with _Functor =3D TestClass::; std::false_type = =3D std::integral_constant]=E2=80=99 _M_destroy(_Any_data& __victim, false_type) ^ /usr/include/c++/5/functional:1724:2: note: a later -fabi-version=3D (or = =3D0) avoids this error with a change in mangling TEST.cpp:12:1: error: =E2=80=98static void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, con= st std::_Any_data&, std::false_type) [with _Functor =3D TestClass::; std::false_type =3D std::integral_constant]=E2=80=99 conflicts= with a previous declaration } ^ In file included from TEST.cpp:1:0: /usr/include/c++/5/functional:1708:2: note: previous declaration =E2=80=98s= tatic void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, con= st std::_Any_data&, std::false_type) [with _Functor =3D TestClass::; std::false_type =3D std::integral_constant]=E2=80=99 _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) ^ /usr/include/c++/5/functional:1708:2: note: a later -fabi-version=3D (or = =3D0) avoids this error with a change in mangling Version: g++ -v Using built-in specs. COLLECT_GCC=3Dg++-5 COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 5.1.0-0ubuntu11~14.04.1' --with-bugurl=3Dfile:///usr/share/doc/gcc-5/README= .Bugs --enable-languages=3Dc,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=3D/u= sr --program-suffix=3D-5 --enable-shared --enable-linker-build-id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dc++98 --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=3Dgtk --enable-gtk-cairo --with-java-home=3D/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-ho= me --with-jvm-root-dir=3D/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=3D/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=3Damd64 --with-ecj-jar=3D/usr/share/java/eclipse-ecj.= jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 5.1.0 (Ubuntu 5.1.0-0ubuntu11~14.04.1)=20 Observations: The code will compile if any one of the following changes are made. - Use g++-4.9 - Compile without the "-g" option - Remove either parameter from "do_things" prototype - Make "do_things" prototype a global function instead of a static member funtion. - Change the default parameters from a "do nothing" lambda to a "do nothing" function name. >>From gcc-bugs-return-484888-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 28 17:57:18 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30019 invoked by alias); 28 Apr 2015 17:57:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 29723 invoked by uid 48); 28 Apr 2015 17:57:14 -0000 From: "schwab@linux-m68k.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug web/64968] Upgrade GCC Bugzilla to 5.0 Date: Tue, 28 Apr 2015 17:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: web X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: schwab@linux-m68k.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: LpSolit at netscape dot net X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02440.txt.bz2 Content-length: 530 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64968 --- Comment #20 from Andreas Schwab --- I don't think this has anything to do with the timezone of the commenter. For example the mail for comment #19 has the date "Tue, 28 Apr 2015 16:28:19 +0000" (which is correct), but comment #18 was sent with the date "Tue, 28 Apr 2015 10:44:58 +0000" (which is 5:30(!) hours off). Both mails were sent immediately after the comment was entered, and I assume that both were entered from the same local timezone.