SourceForge: Modify: 233548 - Doesn't accept "public virtual" base classes

OSDN: Open Source Development Network: Newsletters - Jobs | SEARCH: |  |

Logged In: tim_littlefair
Logout Register New Project Account Maintenance Change My Theme My Personal Page Bookmark this page
Search
Require All Words
Project: C and C++ Code Counter
Project Summary Project Admin
Software
Software Map New Releases Other Site Mirrors Code Snippet Library
SourceForge.net
Site Docs Work for Sourceforge! Discussion Forums Project Help Wanted Top Projects Site Status Contact Support jobs.osdn.com Compile Farm Contact SourceForge.net About SourceForge.net
SourceForge.net Foundries
About Foundries Clustering Distributed Computing Linux on Large Systems Linux Kernel Linux Drivers 3D Games Java Printing Storage
|  | Project: C and C++ Code Counter ## Trackers Summary | Admin | Home Page | Forums | Tracker | Bugs | Support | Lists | Tasks | News | Files | Submit New | Browse | Reporting | Admin ## [ #233548 ] Doesn't accept "public virtual" base classes
(?)
Submitted By: Victor B. Putz (`vputz`) | Date Submitted: 2001-02-22 05:13
Data Type: (?) |
Category: (?) (admin) | Group: (?) (admin)
Assigned To: (?) (admin) | Priority: (?)
Status: (?) | Resolution: (?)
Summary: (?)
When specifying virtual base classes, CCCC understands the word order "virtual public", but not the word order "public virtual". GCC happily compiles both versions. For example: test.cpp : class a { }; class b : public virtual a { }; void main( void ) { } When run with the above file (gcc-compatible), CCCC responds with the following: Processing test.cpp as C/C++ (c++.ansi) test.cpp(5): syntax error at token virtual Parser context: test.cpp(5): trying to match type_name at 'virtual test.cpp(5): trying to match inheritance_item at 'public test.cpp(5): trying to match inheritance_item_list at 'public test.cpp(5): trying to match inheritance_list at ': test.cpp(5): trying to match class_suffix at ': test.cpp(5): trying to match class_declaration_or_definition at 'class test.cpp(5): trying to match definition_or_declaration at 'class test.cpp(5): trying to match link_item at 'class test.cpp(5): trying to match start at 'class test.cpp(1): trying to match start at 'class test.cpp(5): syntax error at token a Parser context: test.cpp(5): trying to match class_block at 'a test.cpp(5): trying to match class_suffix at ': test.cpp(5): trying to match class_declaration_or_definition at 'class test.cpp(5): trying to match definition_or_declaration at 'class test.cpp(5): trying to match link_item at 'class test.cpp(5): trying to match start at 'class test.cpp(1): trying to match start at 'class test.cpp(6): syntax error at token { Parser context: test.cpp(5): trying to match class_suffix_trailer at 'a test.cpp(5): trying to match class_suffix at ': test.cpp(5): trying to match class_declaration_or_definition at 'class test.cpp(5): trying to match definition_or_declaration at 'class test.cpp(5): trying to match link_item at 'class test.cpp(5): trying to match start at 'class test.cpp(1): trying to match start at 'class test.cpp(7): syntax error at token } Parser context: test.cpp(7): trying to match start at '} test.cpp(5): trying to match start at 'class test.cpp(1): trying to match start at 'class Generating reports Primary HTML output is in .cccc/cccc.html Detailed reports on modules and source are in .cccc Database dump is in .cccc/cccc.db Note that if the words "public" and "virtual" are reversed in the above class definition, CCCC seems to be just fine (ie "virtual public" is acceptable to CCCC, but "public virtual" is not). Perhaps there's a C++ standard that prohibits "public virtual", but gcc, even with warnings on, accepts it without comment. -->VPutz
Use Canned Response: (?) (admin) OR Attach A Comment: (?) ### Followups: ### No Followups Have Been Posted
Check to Upload & Attach File: (?) File Description: #### Existing Files:
Delete | Name | Description | Download
No Files Currently Attached
#### Change Log: ### No Changes Have Been Made to This Item

Show Source