Have a look at Lightweight C++. The original site is gone but the files are still availables. PyVM by the same author has LWC++ 1.4
Downloads: LWC++ 1.3 : http://linux.softpedia.com/progDownload/Lightweight-Cplusplus-Download-1318. html PyVM 2.1 : http://students.ceid.upatras.gr/~sxanth/pyvm-2.0/ Aka -- Lightweight C++ 1.3.2 description Lightweight C++ is a programming language that looks like C++ (a lightweight C++ dialect) and is directly translated to readable C by the lwc preprocessor. Its more "K&R" and, well, more lightweight. Important thing about lightweight C++ is that by studying the generated C code it is easy to understand how OOP features are implemented and what is the cost of everything. Adding new features and extensions is also very easy (much easier than adding new C++ extensions to gcc at least), and this is one of lwc goals: To keep evolving. Main features: - function overloading, - member functions, - inheritance, - virtual functions (polymorphism), - multiple inheritance, - virtual inheritance and pure virtual functions, - constructors, destructors, - new and delete, - default function arguments, - simple exceptions (no auto destruction of locals) - and a mechanism of simplistic templates (implemented as high-level multi-line macros). - operator overloading (works with ptrs when it can) - +other Enhancements: - Changed the generated code for the gcc cleanup attribute so that if a constructor throws, the destructor is not invoked. As in the simple case where we dont have the cleanup attribute and like C++. _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
