| Summary: | C++ parser doesn't recognize 'register' keyword. | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Jan Kriho <Erbureth> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 4.0.90 | ||
| Target Milestone: | 4.1.0 | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Simple testcase | ||
|
Description
Jan Kriho
2010-10-11 13:00:12 UTC
I cannot even compile this with gcc, can you give a fully compiling example please? Sorry about the misinformation, the correct syntax is, of course register int i; (compilable with g++ 4.6) However, the bug is no longer present in 4.2.2, thanks for the fix. Created attachment 61647 [details]
Simple testcase
Seems like both examples of syntax are accepted by g++, attaching the testcase for the former example (tested with g++ 4.2 -- 4.6) However, the KDevelop stil doesn't recognize the "int register varname;" syntax.
Sorry about the confusion, the bug is still present in 4.2.2, as it doesn't accept the syntax accepted by g++ Git commit 4e7bf7a7c910d3cbf9e34cec7df1a642e2ac7f55 by Milian Wolff.
Committed on 08/07/2011 at 15:51.
Pushed by mwolff into branch 'master'.
support arbitrary order of type-specifier and storage-class-specifier
TODO: we really need to adhere to the spec better by adding a
parserDeclSpecifier which should solve this problem and others
BUG: 253827
M +5 -0 languages/cpp/parser/parser.cpp
M +9 -0 languages/cpp/parser/tests/test_parser.cpp
M +2 -0 languages/cpp/parser/tests/test_parser.h
http://commits.kde.org/kdevelop/4e7bf7a7c910d3cbf9e34cec7df1a642e2ac7f55
|