Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 90715 - [Parser] [Ambiguity] fn declarator vs nested declarator
Summary: [Parser] [Ambiguity] fn declarator vs nested declarator
Status: RESOLVED DUPLICATE of bug 86504
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Markus Schorn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-07 16:12 EDT by Andrew Niefer CLA
Modified: 2008-06-03 11:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2005-04-07 16:12:08 EDT
from 90633, cpp spec 8.2-7a:
class C { };
void f(int(C)) { } // void f(int (*fp)(C c)) { }
	           // not: void f(int C);
int g(C);
void foo() {
   f(1);  //1: error: cannot convert 1 to function pointer
   f(g);  //2: OK
}

void f( int (C) ) {}
is not parsing properly.

the parameter should have a function declarator with no name and 1 parameter of
type C.  Instead we have a nested declarator with name C.

With bindings, currently (1) is successful and (2) is a problem, once the ast is
fixed, the reverse should be true.
Comment 1 Doug Schaefer CLA 2007-08-21 10:58:40 EDT
Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'.
Comment 2 Markus Schorn CLA 2008-06-03 11:07:07 EDT

*** This bug has been marked as a duplicate of bug 86504 ***