MCPP(1)
π MCPP(1) β Matsui CPP, an alternative C preprocessor π
π¦ NAME π¦
Okay bestie, meet mcpp β Matsui CPP, an alternative C preprocessor. π
π» SYNOPSIS π»
mcpp [options] [<infile> [<outfile>]]
πΈ DESCRIPTION πΈ
mcpp is a C/C++ preprocessor with the highest conformance, and it implements C90, C99 and C++98. It has plentiful diagnostics and many #pragmas. It is useful to check portability of your program, and itβs also useful to debug a 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 theyβre not specified, <infile> defaults to standard input and <outfile> defaults to standard output. π«Ά
It takes the following options.
π Commonly used options π
-@MODEβ specify the preprocessing mode.MODEshould be one of these 4:-@stdβ Standard conforming mode. (default)-@poststd,-@postβ special 'post-Standard' mode.-@krβ K&R 1st mode.-@oldprep,-@oldβ "old_preprocessor" mode (i.e. "Reiser model" cpp).-@compatβ Standard 'compatible' mode.
yes bestie, it says 4 and then lists five β we are not editing the sacred text π
-Cβ output also comments.-D <macro>[=<value>]β define<macro>as<value>(default:1).-D <macro(args)>[=<replace>]β define<macro(args)>as<replace>.-e <encoding>β change the default multi-byte character encoding to one of:euc_jp,gb2312,ksc5601,big5,sjis,iso2022_jp,utf8.-I <directory>β add<directory>to the#includesearch list.-I-β unset system or site specific include directories.-jβ do not output the source line in diagnostics.-kβ keep white spaces of input lines as they are.-M,-MM,-MD,-MMD,-MP,-MQ target,-MT target,-MF fileβ output source file dependency line for makefile.-m32β change target CPU fromx86_64,ppc64toi386,ppc, respectively.-m64β change target CPU fromi386,ppctox86_64,ppc64, respectively.-[no-]mmxβ (un-)define__MMX__.-Nβ don't predefine any non-standard macros.-o <file>β output to<file>.-Pβ don't output#linelines.-Qβ output diagnostics to"mcpp.err"(default:stderr).-U <macro>β undefine<macro>.-vβ show version ofmcpp.-W <level>β 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 <n>β re-define the pre-defined macro__STDC_HOSTED__as<n>.-S <n>β redefine__STDC__to<n>, undefine old style macros.-V <n>β redefine__STDC_VERSION__or__cplusplusto<n>. C with-V199901Lspecifies C99 mode. C++ with-V199901Lspecifies C99 compatible mode.
π§ Options available with only -@std (default) option π§
-@compatβ expand recursive macro more than Standard.-3β enable trigraphs.-Kβ embed macro annotations into comments.
π Options available with -@std (default), -@kr or -@oldprep options π
-aβ process "assembler" source.
πͺ PRAGMA πͺ
mcpp has the following #pragma directives.
#pragma onceβ read the header file only once even if multiply#included.#pragma __setlocale( "encoding")β specify the multibyte character encoding to"encoding". See-eoption for the encodings.#pragma MCPP put_definesβ putout all the macro definitions currently valid.#pragma MCPP debug <args>β start to putout debugging informations.<args>should be one or more of:tokenexpandmacro_callpathifexpressionmemorygetc
#pragma MCPP end_debug <args>β stop to putout debugging informations.<args>are the same with'debug'.- No argument specifies all arguments.
#pragma MCPP push_macro( "MACRO")β save the macro definition to the stack.#pragma MCPP pop_macro( "MACRO")β retrieve the macro definition from the stack.#pragma MCPP preprocessβ "Pre-preprocess" the following header files formcpp.#pragma MCPP warning any messageβ putout warning"any message".
π VERSION π
MCPP V.2.7 (2008/03) 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. π
with love from alternative CPP Β· Mar 2008 Β· page MCPP(1) β version MCPP V.2.7 (2008/03) compiler-independent-build πβ¨
π¦ where this page comes from
- arch rolling: mcpp 2.7.2.3-1 Β· BSD-2-Clause
- nixos 26.05: mcpp 2.7.2.3
- nixpkgs unstable: mcpp 2.7.2.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms