diff mbox

Fix PR c++/59638

Message ID 42e69e6bda9dd7c17a10c52eed0eb6bc@imap.force9.net
State New
Headers show

Commit Message

Adam Butcher Jan. 6, 2014, 5:58 p.m. UTC
On 2014-01-06 14:36, Jason Merrill wrote:
> On 01/04/2014 04:54 AM, Adam Butcher wrote:
>> +  /* Declarations involving function parameter lists containing 
>> implicit
>> +     template parameters will have been made into implicit 
>> templates.  If they
>> +     do not turn out to be actual function declarations then finish 
>> the
>> +     template declaration here.  */
>
> This will always be an error, right?  Please mention that in the
> comment.  OK with that change.
>
Yes I think so.  Will commit with this mod:

function then
+     finish the template declaration here.  An error message will 
already have
+     been issued.  */
    if (parser->fully_implicit_function_template_p)
      if (!function_declarator_p (declarator))
        finish_fully_implicit_template (parser, /*member_decl_opt=*/0);
diff mbox

Patch

diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 991588d..68f81b7 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -16784,10 +16784,11 @@  cp_parser_init_declarator (cp_parser* parser,
        warning (OPT_Wattributes,
                "attributes after parenthesized initializer ignored");

-  /* Declarations involving function parameter lists containing 
implicit
-     template parameters will have been made into implicit templates.  
If they
-     do not turn out to be actual function declarations then finish 
the
-     template declaration here.  */
+  /* A non-template declaration involving a function parameter list 
containing
+     an implicit template parameter will have been made into a 
template.  If it
+     turns out that the resulting declaration is not an actual