From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4262 invoked by alias); 18 Nov 2013 04:13:42 -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 4237 invoked by uid 48); 18 Nov 2013 04:13:37 -0000 From: "thakis at chromium dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59165] New: gcc looks up begin(), end() for for-range loops for ints in namespace std Date: Mon, 18 Nov 2013 04:13: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thakis at chromium dot org X-Bugzilla-Status: UNCONFIRMED 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 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: 2013-11/txt/msg01604.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59165 Bug ID: 59165 Summary: gcc looks up begin(), end() for for-range loops for ints in namespace std Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: thakis at chromium dot org This compiles, but shouldn't: $ cat gcc4.8bug.cc=20 // builds with gcc4.8, but shouldn't namespace std { int* begin(int i) { return (int*)0; } int* end(int i) { return (int*)0; } } int main() { for (int a : 10) { } } $ gcc-4.8.1 -c gcc4.8bug.cc -std=3Dc++11 # works The standard says that begin() and end() for foreach loops should be looked= up in the associated namespace of the type of the expression (6.5.4p1) """otherwise, begin-expr and end-expr are begin(__range) and end(__range), respectively, where begin and end are looked up in the associated namespaces (3.4.2). [ Note: Ordinary unquali=EF=AC=81ed lookup (3.4.1) is not performe= d. =E2=80=94 end note ]""" 10 has type int, which is a fundamental type, and hence doesn't have an associated namespace. So this shouldn't compile. (It doesn't compile in cla= ng.) $ gcc-4.8.1 --version gcc-4.8.1 (GCC) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >>From gcc-bugs-return-434828-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 18 04:46:31 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 310 invoked by alias); 18 Nov 2013 04:46:30 -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 32732 invoked by uid 48); 18 Nov 2013 04:46:25 -0000 From: "dongsheng.song at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57897] Target x86_64-w64-mingw32 failed with '-mno-fentry isn't compatible with SEH' Date: Mon, 18 Nov 2013 04:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dongsheng.song at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: 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: 2013-11/txt/msg01605.txt.bz2 Content-length: 682 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57897 --- Comment #6 from Dongsheng Song --- After revert r192062, I can build gcc smoothly. $ svn log -r 192062 ------------------------------------------------------------------------ r192062 | uros | 2012-10-04 13:53:22 +0800 (Thu, 04 Oct 2012) | 4 lines * configure.ac (noexception_flags): Add -fasynchronous-unwind-tables. * configure: Regenerate. ------------------------------------------------------------------------ 2012-10-04 Uros Bizjak * configure.ac (noexception_flags): Add -fasynchronous-unwind-tables. * configure: Regenerate.