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

Bug 329060

Summary: *.c and *.C - (not capitalized and capitalized) - get different indexer parser log file
Product: [Tools] CDT Reporter: Eclipse_Keil <llw2go>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: RESOLVED WORKSFORME QA Contact: Markus Schorn <mschorn.eclipse>
Severity: major    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Eclipse lies, : ) none

Description Eclipse_Keil CLA 2010-10-29 12:11:02 EDT
Created attachment 182062 [details]
Eclipse lies, : )

Windos Xp

Eclipse Galileo, CDT 6.0, also
Eclipse Galileo, CDT 7.0, also
Eclipse Helios, CDT 7.0, also
Eclipse Helios, CDT 8.0

We have C-Proj with some C source files and some H header files.

I was wondering, sometimes i can switch between "Function Definition" and "Function Declaration" through F3, but sometimes times not - i can only jump to "Function Declaration" which is stored in header files - i can't see the "Function Definition" in the C files.

I can finally find out, the source files with *.C ending was treated as Cpp files (in which the F3 works) and the source files with *.c ending was treated as C files (in which the F3 DONT work). So i try to tell Eclipse, treat *.c also as Cpp files, but i can't.

As you can see in the picture in the attachment, as i try to add *.c file type C++, eclipse tell me *.c is C++ files - IT LIES. :)

I'm not sure, if we chang the C to c, will the bug be resolved?

Thanks
Mike
Comment 1 Markus Schorn CLA 2010-11-04 05:33:28 EDT
If you use the extension '.C' for c-files you need to reassign the extension to the 'C Source File' content type on project level. (Project Properties - C/C++ General - File Types). You should not do the reverse, i.e. assign '.c' to c++.

You cannot do this on workspace level, because the content-type is built-in. This is a limitation of the platform.

Also the platform (responsible for the workspace-level content-types) treats file extensions case insensitive. This causes the strange error message. There
is a separate bug on this limitation.
Comment 2 Eclipse_Keil CLA 2010-11-04 07:31:31 EDT
Hi, Markus,

thanks a lot.

It works...

Mike