http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60361
Jonathan Wakely <redi at gcc dot gnu.org> 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 <redi at gcc dot gnu.org> --- 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, <unresolved overloaded function type>)' 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.