Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] (no subject)

Although your compiler supports this I am wondering if that is not
underneath a design issue.

Functions are typically just for one purpose and if that purpose has to
change, since the beginning the control flow statements should have
called a different routine.

It may be the case as well more functions are required.

Anyways the error should not happen.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Schorn, Markus
Sent: Thursday, March 11, 2010 11:56 AM
To: CDT General developers list.
Subject: RE: [cdt-dev] (no subject)

CDT should not throw an exception, please create a bug report for that
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT

I am pessimistic about supporting 'global' labels,
Markus. 

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of David Sariel
> Sent: Thursday, March 11, 2010 4:54 PM
> To: CDT General developers list.
> Subject: [cdt-dev] (no subject)
> Importance: Low
> 
> Hello,
> 
> Apologies for the long post.
> 
> I want goto labels be defined in different function then the 
> goto was called in (our language compiler supports non-local 
> branching in this kind).  Goto <label_name> can be called in 
> one translation unit, while the "label_name:" may be located 
> in another one.
> 
> 
> Currently in CDT clicking F3 on the "label_name" in the 
> following example (both functions are in the same TU):
> 
> 
> it foo(){
> 	label_name:
> 		....
> 
> }
> 
> 
> int Boo(){
> 	...
> 	goto label_name;
> 	...
> }
> 
> Gives the following error:
> 
> java.lang.ClassCastException:
> org.eclipse.cdt.internal.core.dom.parser.c.CASTTypedefNameSpecifier
> cannot be cast to
> org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier
> 	at 
> org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisi
> tor.findDeclarationOwner(CPPVisitor.java:2062)
> 	at 
> org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisi
> tor.findNameOwner(CPPVisitor.java:2038)
> 	at 
> org.eclipse.cdt.internal.core.dom.parser.ProblemBinding.getOwn
> er(ProblemBinding.java:249)
> 	at 
> org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisi
> tor.getQualifiedName(CPPVisitor.java:1898)
> 	at 
> org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsJob
> .removeSecondaryBindings(OpenDeclarationsJob.java:635)
> 	at 
> org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsJob
> .navigationFallBack(OpenDeclarationsJob.java:596)
> 	at 
> org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsJob
> .runOnAST(OpenDeclarationsJob.java:232)
> 	at 
> org.eclipse.cdt.internal.core.model.ASTCache.runOnAST(ASTCache
> .java:221)
> 	at 
> org.eclipse.cdt.internal.ui.editor.ASTProvider.runOnAST(ASTPro
> vider.java:344)
> 	at 
> org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsJob
> .performNavigation(OpenDeclarationsJob.java:136)
> 	at 
> org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsJob
> .run(OpenDeclarationsJob.java:112)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> 
> 
> 
> I thought that the workaround to my problem will be to insert 
> the lable_name to the AST as external variable and not as 
> labeled statement. What do you think?
> 
> Thank you,
> David
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

************************************************************************
****************
Note:  If the reader of this message is not the intended recipient, or
an employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us
immediately by replying to the message and deleting it from your
computer. Thank you. 
************************************************************************
****************

****************************************************************************************

Note:  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. 

****************************************************************************************


Back to the top