[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
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
>