Re: C structs and Semantic aren't working well together

"Eric M. Ludlam" <[email protected]>
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
On 09/12/2014 11:14 PM, [email protected] wrote:
>
> Well, as the subject says, C structs are broken in Semantic.
>
> Take the code for example:
>
> struct Foo
> {
>          int Bar;
> };
    ^
    \ right here

> int main()
> {
>          struct Foo Baz;
>          Ba -- Cannot find completion for `"Ba"'
>          Baz. -- Cannot find types for `"Ba"'
>          return 0
> }
>
> What makes it even weirder is that it pretty much works(?, I haven't
> tried structs on headers, but functions on headers works), except for
> the fact that if you declare a struct inside the code itself, it fails.

Hi,

If I put a semi-colon at the end of the declaration (see above) 
everything "works for me".

Are there variants that don't need a semi-colon?

I like using `global-semantic-decoration-mode'.  It will highlight 
declarations like that struct.  If it isn't over-lined, then you know 
Semantic can't complete on it.

Eric

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.