---
name: "mcpp"
section: "1"
platform: "linux"
package: "mcpp"
version: "2.7.2.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mcpp"
---

# mcpp(1)

Matsui CPP, an alternative C preprocessor

## 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:

- **-@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.

- **-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 #include search 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 from x86\_64, ppc64 to i386, ppc, respectively.

- **-m64**

  Change target CPU from i386, ppc to x86\_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 #line lines.

- **-Q**

  Output diagnostics to "mcpp.err" (default:stderr).

- **-U \<macro\>**

  Undefine \<macro\>.

- **-v**

  Show version of **mcpp**.

- **-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 \_\_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.

- **-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 -e option 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:\
       token expand macro\_call path if expression memory getc

- \#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 for **mcpp**.

- \#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.
