mcpp -- a portable C preprocessor

What is a C preprocessor?

In compilation of C/C++ source program, preprocessing takes place before compilation in narrower sence. Preprocessing processes #include, #if, #define and some other directives, and expands macros.

Every C/C++ compiler system has a preprocessor. In recent years many compilers absorbed preprocessor into themselves, nevertheless, they always do preprocessing internally.

C preprocessor has existed ever since the beginning of C language. Most of the preprocessors have been, however, rather bonuses attached to the compilers. Against that background, they have many problems such as insufficient conformance and too many implementation-specific behaviors. Though the main purpose of preprocessing phase in C/C++ language is to provide portability, preprocessing itself sometimes impaires portability.

What is mcpp?

mcpp is a C/C++ preprocessor with the following features.

Implements all of C90, C99 and C++98 specifications.

Provides a validation suite to test C/C++ preprocessor's conformance and quality comprehensively. When this validation suite is applied, mcpp distinguishes itself among many existing preprocessors.

distinguishes itself among many existing preprocessors. Has plentiful and on-target diagnostics to check all the preprocessing problems such as latent bug or lack of portability in source code.

Has #pragma directives to output debugging information.

Is portable and has been ported to many compiler-systems, including GCC and Visual C++, on UNIX-like systems and Windows.

Has various behavior modes.

Can be built either as a compiler-specific preprocessor to replace the resident preprocessor of a particular compiler system, or as a compiler-independent command, or even as a subroutine called from some other main program.

Provides comprehensive documents both in Japanese and in English.

Is an open source software released under BSD-style-license.

It is probably number one C/C++ preprocessor now available in the world.

Please read the following document to get outlines of mcpp:

"Exploratory Software Project"

mcpp project was selected as one of the year 2002 "Exploratory Software Projects" at Information-Technology Promotion Agency, Japan (IPA), and selected again for the year 2003 projects. For the achievements of the project, the author was evaluated as one of the highest class programmers. "Exploratory Software Projects" is located at (written in Japanese only) :

To get mcpp (from the next page)

The latest release of mcpp is V.2.7.2 (November, 2008).

mcpp project in SourceForge

mcpp has been located in SourceForge since April, 2006.

Here is the entrance of mcpp project: Summary Page

Please post the bug-reports, comments and questions to: Open Discussion Forum

I am waiting for many C programmer's comments, feedbacks and participations in mcpp development.

This page was last updated on November 30th, 2008.

Kiyoshi MATSUI kmatsui