mcpp

NAME

mcpp - Matsui CPP, an alternative C preprocessor

SYNOPSIS

mcpp [options] [<infile> [<outfile>]]

DESCRIPTION

mcpp is a C/C++ preprocessor with the highest conformance which implements C90, C99 and C++98. mcpp has plentiful diagnostics and many #pragmas. It is useful to check portability of your program, and also useful to debug complicated macro. This is a man-page for mcpp of compiler-independent-build.

OPTIONS

mcpp expects two file names as arguments, <infile> and <outfile>. If not specified, <infile> defaults to standard input and <outfile> defaults to standard output.
It takes the following options.
Commonly used options:
-@MODE Specify preprocessing mode. MODE should be one of these 4:
" Standard conforming mode. (default)
" special 'post-Standard' mode.
" K&R 1st mode.
" "old_preprocessor" mode (i.e. "Reiser model" cpp).
-C Output also comments.
"-D Define <macro> as <value> (default:1).
"-D Define <macro(args)> as <replace>.
"-e Change the default multi-byte character encoding to one of: euc_jp, gb2312, ksc5601, big5, sjis, iso2022_jp, utf8.
"-I Add <directory> to the #include search list.
-I- Unset system or site specific include directories.
-j Do not output the source line in diagnostics.
"-M, Output source file dependency line for makefile.
-N Don't predefine any non-standard macros.
"-o Output to <file>.
-P Don't output #line lines.
-Q Output diagnostics to "mcpp.err" (default:stderr).
"-U Undefine <macro>.
-v Show version of mcpp.
"-W Set warning level to <level> (OR of {0,1,2,4,8,16}, default:1).
-z Don't output the included file, only defining macros.
Options available with -@std (default) or -@poststd options:
-+ Process C++ source.
-2 Enable digraphs.
"-h Re-define the pre-defined macro __STDC_HOSTED__ as <n>.
"-S Redefine __STDC__ to <n>, undefine old style macros.
"-V Redefine __STDC_VERSION__ or __cplusplus to <n>.
C with -V199901L specifies C99 mode.
C++ with -V199901L specifies C99 compatible mode.
Options available with only -@std (default) option:
-@compat Expand recursive macro more than Standard.
-3 Enable trigraphs.
Options available with -@std (default), -@kr or -@oldprep options:
-a Process "assembler" source.

PRAGMA

mcpp has the following #pragma directives.
"#pragma Read the header file only once even if multiply #included.
"#pragma Specify the multibyte character encoding to "encoding". See -e option for the encodings.
"#pragma Putout all the macro definitions currently valid.
"#pragma Start to putout debugging informations. <args> should be one or more of: token expand path if expression memory getc
"#pragma Stop to putout debugging informations. <args> are the same with 'debug'. No argument specifies all arguments.
"#pragma Save the macro definition to the stack.
"#pragma Retrieve the macro definition from the stack.
"#pragma "Pre-preprocess" the following header files for mcpp.
"#pragma Putout warning "any message".

VERSION

MCPP V.2.6.4 (2007/05) compiler-independent-build

SEE ALSO

Do 'man mcpp-gcc' for mcpp of GCC-specific-build. The full documentation for mcpp are maintained as html files. Please see mcpp-manual.html.