Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358282 - Name resolution problem with mismatched 'class' and 'struct'
Summary: Name resolution problem with mismatched 'class' and 'struct'
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0.2   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 398377
  Show dependency tree
 
Reported: 2011-09-20 13:48 EDT by Sergey Prigogin CLA
Modified: 2013-01-17 06:57 EST (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 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