Version: 4.2.3 (using KDE 4.7.1) OS: Linux When I write the following code: struct globalArgs_t { const char *branch; int numInputFiles; char **inputFiles; } static globalArgs; KDevelop reports a syntax analysis problem: "Expected token ';' after '}' found 'static'". Reproducible: Always Expected Results: OS: Linux (x86_64) release 3.0-ARCH Compiler: gcc
Created attachment 98694 [details] kdevelop correctly compiles for the static object declaration after struct Reproduced the code given of the struct. kdevelop correctly compiles without any errors or warnings when a static object declaration is made for the struct. Attached the screenshot of the reproduced code along with the output.
@Chaitanya: Again, this is not about compilation of above program, but about KDevelop's internal C++ support. "kdevelop correctly compiles" is a false statement as well, it's your compiler who's responsible for compiling the program. KDevelop is not a compiler. Checked this issue under KDevelop 5: The new Clang backend reports no problems in above code example. Fixed.