Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Syntax error with computed goto(Syntax errors appear with good code)
Syntax error with computed goto [message #883167] Thu, 07 June 2012 20:43 Go to next message
Eclipse UserFriend
Using Indigo with CDT.
Attached screen shot shows syntax errors indicated in code that compiles without warnings or errors.
The computed goto's seem to choke the editor?
Am I missing an Eclipse setting?
Thanks.

index.php/fa/10129/0/
Re: Syntax error with computed goto [message #889792 is a reply to message #883167] Tue, 19 June 2012 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Well, there is an error on the line 39, before the goto.
Re: Syntax error with computed goto [message #890065 is a reply to message #889792] Wed, 20 June 2012 17:43 Go to previous messageGo to next message
Eclipse UserFriend
Yes, for some reason Eclipse shows that there is an error.
However, the compiler does not. That code will compile.
What is the error? How can it be fixed?
Re: Syntax error with computed goto [message #892143 is a reply to message #890065] Wed, 27 June 2012 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Bob Wirka wrote on Wed, 20 June 2012 23:43
Yes, for some reason Eclipse shows that there is an error.
However, the compiler does not. That code will compile.
What is the error? How can it be fixed?

The double ambersand "&&inst1" confuses the parser (and me too Razz ).
Re: Syntax error with computed goto [message #892871 is a reply to message #892143] Sat, 30 June 2012 16:53 Go to previous messageGo to next message
Eclipse UserFriend
Have you declared to CDT that you were coding in C++11 ?
Re: Syntax error with computed goto [message #893080 is a reply to message #892871] Mon, 02 July 2012 10:10 Go to previous message
Eclipse UserFriend
Harry,

Just tried the __GXX_EXPERIMENTAL_CXX0X__ and "-std=c++0x" suggestions in various combinations with no luck.

My project is a 'C' project (not C++), and if you put "-std=c++0x" in the compiler command line, you get a message to the effect that the switch only works with C++.

Saw another post where someone commented:

"Did this remove spurious editor errors? I have no problem with compiling, and new std types are recognised, but I can't get rid of editor syntax errors for range based for loops and rvalue references &&. juanchopanza May 3 at 13:09"

Maybe there's no workaround?

Thanks,

Bob Wirka
Previous Topic:Content Assist doesn't work in all projects
Next Topic:print warning in console and show them in files
Goto Forum:
  


Current Time: Sun Jul 20 11:54:23 EDT 2025

Powered by FUDForum. Page generated in 0.04014 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top