From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127971 invoked by alias); 7 Sep 2015 14:36: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 Received: (qmail 127925 invoked by uid 48); 7 Sep 2015 14:36:14 -0000 From: "dougmencken at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug objc++/57607] g++ cannot distinguish obj-c message call from c++11 lambda Date: Mon, 07 Sep 2015 14:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: objc++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dougmencken 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: cc 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-09/txt/msg00514.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57607 Douglas Mencken changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dougmencken at gmail dot com --- Comment #1 from Douglas Mencken --- I confirm it: still here with 4.9.2 $ g++ -std=c++11 test.mm && ./a.out test.mm: In function 'int main()': test.mm:8:10: error: expected identifier before ']' token [] () { std::cout << "Hello world!" << std::endl; }(); ^ test.mm:8:10: error: '' is not an Objective-C class name or alias test.mm:8:10: error: objective-c++ message argument(s) are expected before ']' token test.mm:8:61: error: expected primary-expression before ')' token [] () { std::cout << "Hello world!" << std::endl; }(); ^ $ g++ --version | head -1 g++ (GCC) 4.9.2 Issue also causes errors like /usr/include/c++/4.9.2/bits/hashtable.h:878:15: error: objective-c++ message argument(s) are expected before ']' token [this](const __node_type* __n) /usr/include/c++/4.9.2/bits/hashtable.h:916:17: error: objective-c++ message argument(s) are expected before ']' token [&__roan](const __node_type* __n)