The «philosophy» behind cpik

My idea was to develop a compiler as simple as possible but conformant to the ANSI specifications. This is a huge work for one developper (with many other activities), so I had to decide what is important and what is not. My underlaying idea is the following: it is better to drop a feature than to incompletely or inexactly implement it.

For example, I initially chose to suppress the support for bit fields because bit fields manipulations can be easily performed using standard C operators such as &, |, ^ and so on.

I also dropped the switch statement, because it is always possible to replace this statement with cascaded if(s). The resulting code is generally less efficient, but works. Finally, this statement is supported since V0.5.3.

The first version of cpik (V0.2) did not recognize the typedef instruction, and had no support for structs or unions. typdef has been implemented in V0.3, and structures/unions in V0.4. 32 bit integer arithmetic is supported since V0.5.

Floating point support exists since version V0.6.0, and comes with a very decent math library including trigonometric and logarithmic functions.

Support for bit fields exists since V0.7.0., so support for the ANSI-C standard is now almost complete. cpik is well supported by pikdev (my IDE for pic processors) so the pikdev/cpik couple is really very handy and pleasant to use.

Volunteers are welcome for any help, including tests, benchmarking, documentation and libraries writing. Please see the section «How to contribute to the cpik project ?» for details.

This compiler is written in C++. Any feedbacks concerning bugs, feature requests or criticisms can be addressed to Alain Gibaud (alain.gibaud@free.fr).

AG 2013-04-10