Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358282

Summary: Name resolution problem with mismatched 'class' and 'struct'
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-parserAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.0.2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 398377    

Description Sergey Prigogin CLA 2011-09-20 13:48:58 EDT
Case 1:

test.h
------
class A {};
void f(A a) {}

test.cc
-------
struct A;

void test(A a) {
  f(a);  // Problem on f
}

Case 2:

test.h
------
struct A {};
void f(A a) {}

test.cc
-------
class A;

void test(A a) {
  f(a);  // Problem on f
}

GCC compiles both examples without errors.
Comment 1 Sergey Prigogin CLA 2011-09-20 20:40:57 EDT
Fixed in cdt_8_0 and master > 20110920.
Comment 2 CDT Genie CLA 2011-09-20 21:23:03 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 358282 - Name resolution problem with mismatched 'class' and
    'struct'.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ec3395e78d6f54c1167dc8adb8ace08f119a0fe2
Comment 3 CDT Genie CLA 2011-09-20 21:23:05 EDT
*** cdt git genie on behalf of Sergey Prigogin ***

    Bug 358282 - Name resolution problem with mismatched 'class' and
    'struct'.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=745cbac9a9b63a00f1104ad18c5ee5368272ac06