From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32413 invoked by alias); 3 Mar 2014 09:49:01 -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 32385 invoked by uid 48); 3 Mar 2014 09:48:58 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60361] [4.7/4.8/4.9 Regression] unexpected 'use of parameter outside function body' error Date: Mon, 03 Mar 2014 09:49: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: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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_status cf_reconfirmed_on cf_known_to_work short_desc everconfirmed cf_known_to_fail 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: 2014-03/txt/msg00168.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60361 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-03-03 Known to work| |4.3.5 Summary|unexpected 'use of |[4.7/4.8/4.9 Regression] |parameter outside function |unexpected 'use of |body' error |parameter outside function | |body' error Ever confirmed|0 |1 Known to fail| |4.6.2, 4.7.4, 4.8.2, 4.9.0 --- Comment #1 from Jonathan Wakely --- 4.4 and 4.5 say: t.cc:18:34: error: 'A' cannot appear in a constant-expression t.cc:18:36: error: no matching function for call to 'Helper::Helper(int, )' t.cc:3:3: note: candidates are: Helper::Helper(int, void (*)()) t.cc:2:1: note: Helper::Helper(const Helper&) and 4.6 onwards give the "use of parameter 'A' outside function body" error, so if the code is valid this is a regression.