Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Wesolowski2011-06-25 22:29:01 -0400
committerAlena Laskavaia2011-06-25 22:29:01 -0400
commit0060fff70212821ed51e7c13d9ed33a5e2254943 (patch)
tree80c0f635f265a605eb2ddfc6477492e2e84682a5 /codan/org.eclipse.cdt.codan.core.test
parent30a6e551f5d7c355da1e834750109c89ecc1e293 (diff)
downloadorg.eclipse.cdt-0060fff70212821ed51e7c13d9ed33a5e2254943.tar.gz
org.eclipse.cdt-0060fff70212821ed51e7c13d9ed33a5e2254943.tar.xz
org.eclipse.cdt-0060fff70212821ed51e7c13d9ed33a5e2254943.zip
Bug 346559 - [fp] undeserved "no return in function returning non-void"
when using goto
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
index 9169ac64a9..b69f416b1d 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
@@ -255,4 +255,19 @@ public class ReturnCheckerTest extends CheckerTestCase {
loadCodeAndRunCpp(getAboveComment());
checkErrorLine(1);
}
+
+ // int
+ // fp_goto(int a)
+ // {
+ // if (a) {
+ // goto end;
+ // }
+ // end:
+ // return (a);
+ // }
+ public void testGoto_Bug346559() {
+ loadCodeAndRun(getAboveComment());
+ checkNoErrors();
+ }
+
} \ No newline at end of file

Back to the top