Bug 146282

Summary: Function try blocks reported as errors in the compiler (gcc compiles them anyway)
Product: [Applications] kdevelop Reporter: Guillaume CLEMENT <flik>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 3.4.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: File to get the error quickly.
Screenshot showing the errors.

Description Guillaume CLEMENT 2007-06-02 12:28:23 UTC
Version:           3.4.0 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
Compiler:          gcc 1.4.2 Ubuntu 4.1.2-0ubuntu4
OS:                Linux

The parser that reports errors in Kdevelop seems not to know about function try blocks.

I'll attach a .cpp file that compiles and shows the error. the try, catch and the end of the catch bracket lines are reported as errors lines.

Lines after those errors are not properly parsed. For example in the image I will attach, the line :

throw LoadException(a);

produces a LoadException(a) line in the Tree view with the classes.
Comment 1 Guillaume CLEMENT 2007-06-02 12:30:06 UTC
Created attachment 20759 [details]
File to get the error quickly.

This file can be compiled with gcc, and is not properly understood by the
parser.
Comment 2 Guillaume CLEMENT 2007-06-02 12:32:07 UTC
Created attachment 20760 [details]
Screenshot showing the errors.

In this screenshot, you can see the LoadException(a) line in the Classes Tree.

You can also see the three lines reported as errors by Kdevelop, and that the
file is properly compiled by gcc.
Comment 3 Andreas Pakulat 2007-06-02 12:44:04 UTC
Our parser has a couple of shortcomings, but this one is a duplicate. In the future please check the list of existing reports before posting a new one.

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