| Summary: | cpp-parser can not parse switch statement without explicitly opened scope | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | gramic <gramicode> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | emeric.dupont |
| Priority: | LO | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
*** Bug 264482 has been marked as a duplicate of this bug. *** Git commit d61179ce2d404a82b1ea97f9a1149d0b3b9ef4e4 by Olivier JG. Committed on 17/02/2011 at 10:21. Pushed by olivierjg into branch 'master'. Allow switch statement without brackets, add tests. BUG: 204665 M +5 -5 languages/cpp/parser/parser.cpp M +22 -0 languages/cpp/parser/tests/test_parser.cpp http://commits.kde.org/kdevelop/d61179ce2d404a82b1ea97f9a1149d0b3b9ef4e4 Git commit 5df2d0b3f7a307aa5a2fba70bb084c2d50afe747 by Olivier JG. Committed on 17/02/2011 at 10:21. Pushed by olivierjg into branch '4.2'. backport from master: Allow switch statement without brackets, add tests. BUG: 204665 M +5 -5 languages/cpp/parser/parser.cpp M +22 -0 languages/cpp/parser/tests/test_parser.cpp http://commits.kde.org/kdevelop/5df2d0b3f7a307aa5a2fba70bb084c2d50afe747 Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively |
Version: (using KDE 4.2.4) Compiler: gcc 4.3 OS: Linux Installed from: Ubuntu Packages When there is a switch statement like this code: switch(0) case 0:; the parser reports: unexpected token 'case' if there is explicit scope (the curly braces) like this: switch (0){case 0:;}; everything is fine