Bug 139424 - C99-style struct initializer parse error
Summary: C99-style struct initializer parse error
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 3.3.5
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-31 03:23 UTC by Tolga Dalman
Modified: 2013-03-31 00:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tolga Dalman 2006-12-31 03:23:26 UTC
Version:           3.3.5 (using KDE 3.5.5, Gentoo)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.18

Consider the following code snippet:

struct some_struct {
  int a;
  int b;
};

void foo(void) {
  struct some_struct bar = { .a = 10, .b = 20 };
  //...
}

The first line in foo is marked as error, although it is valid C99 code (but not C++). Is there some way to tell the parse, to ignore (or mark the source entirely C-only) ?
Otherwise, it would be nice if this could be resolved....
Comment 1 Jens Dagerbo 2006-12-31 03:50:38 UTC
KDevelop only has a C++ parser, and there is in KDev3 no way to have it treat C properly. Maybe this can be done better in KDev4.

Possible workarounds:
1. if a file called ".kdev_ignore" exists in directory, KDevelop will not parse files in that directory.

2. KDevelop-3.4 will let you turn off the Problem Reporter completely.
Comment 2 Tolga Dalman 2006-12-31 04:27:43 UTC
On Sun, Dec 31, 2006 at 02:50:38AM -0000, Jens Dagerbo wrote:
> KDevelop only has a C++ parser, and there is in KDev3 no way to have it treat C properly. Maybe this can be done better in KDev4.


I see. What about Kdev4 ?

> Possible workarounds:
> 1. if a file called ".kdev_ignore" exists in directory, KDevelop will not parse files in that directory.
> 
> 2. KDevelop-3.4 will let you turn off the Problem Reporter completely.


This is not really applicable for me. I mean, it is a nice feature to
visualize failure, despite these false-positives ...
Comment 3 Andreas Pakulat 2008-07-01 00:10:15 UTC
*** Bug has been marked as fixed ***.
Comment 4 Bartosz Szreder 2012-06-13 04:48:52 UTC
This bug is NOT fixed, but is an offshoot of bug #57156.
Comment 5 Aleix Pol 2013-03-31 00:45:23 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively