Bug 108667 - compound literal initializers/assignments get marked as error
Summary: compound literal initializers/assignments get marked as error
Status: RESOLVED DUPLICATE of bug 57156
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: 3.2.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-06 22:14 UTC by Gunther Piez
Modified: 2013-03-31 00:53 UTC (History)
0 users

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 Gunther Piez 2005-07-06 22:14:46 UTC
Version:           3.2.1 (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          3.4.3 
OS:                Linux

Example from the gcc info page:

Assume that `struct foo' and `structure' are declared as shown: 

      struct foo {int a; char b[2];} structure;


Here is an example of constructing a `struct foo' with a compound
literal:

      structure = ((struct foo) {x + y, 'a', 0});

The second line gets marked as an error, it is perfectly valid. Note that this is not an obscure extension, it is part of the ISO 99 standard.
Comment 1 Gunther Piez 2005-07-06 22:17:01 UTC
Of course, the code compiles fine, it is only marked red in the editor.
Comment 2 Jens Dagerbo 2006-12-29 09:51:36 UTC
Problem is with the parser, not the Problems display widget.
Comment 3 Andreas Pakulat 2007-12-01 00:47:49 UTC
duplicate of the "parses C as C++" bug as far as I can see.

*** This bug has been marked as a duplicate of 57156 ***
Comment 4 Aleix Pol 2013-03-31 00:53:34 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