1MCPP(1)                        Commands for GCC                        MCPP(1)
2
3
4

NAME

6       mcpp - Matsui CPP, an alternative C preprocessor
7

SYNOPSIS

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

DESCRIPTION

12       mcpp  is a C/C++ preprocessor with the highest conformance which imple‐
13       ments C90, C99 and C++98.  mcpp  has  plentiful  diagnostics  and  many
14       #pragmas.   It is useful to check portability of your program, and also
15       useful to debug complicated macro.  This is a man-page for mcpp of GCC-
16       specific-build.
17

OPTIONS

19       mcpp  expects  two file names as arguments, <infile> and <outfile>.  If
20       not specified,  <infile>  defaults  to  standard  input  and  <outfile>
21       defaults to standard output.
22
23       It takes the following options.
24
25       Commonly used options:
26
27       -$, -fno-dollars-in-identifiers
28              Forbid '$' in identifiers.
29
30       -@MODE Specify preprocessing mode. MODE should be one of these 4:
31
32           -@std
33              Standard conforming mode. (default)
34
35           -@poststd, -@post
36              special 'post-Standard' mode.
37
38           -@kr
39              K&R 1st mode.
40
41           -@oldprep, -@old
42              "old_preprocessor" mode (i.e. "Reiser model" cpp).
43
44           -@compat
45              Standard 'compatible' mode.
46
47       -b     Output #line lines in C source style (default: GCC style).
48
49       -C     Output also comments.
50
51       -D <macro>[=<value>]
52              Define <macro> as <value> (default:1).
53
54       -D <macro(args)>[=<replace>]
55              Define <macro(args)> as <replace>.
56
57       -dM, -dD
58              Dump all current macro definitions to output stream.
59
60       -e <encoding>
61              Change  the  default  multi-byte  character  encoding to one of:
62              euc_jp, gb2312, ksc5601, big5, sjis, iso2022_jp, utf8.
63
64       -finput-charset=<encoding>
65              Same as -e <encoding>.  (Do not insert spaces around '=').
66
67       -f[no-]working-directory
68              (Don't) emit #line marks with current working directory.
69
70       -fstack-protector[-all]
71              Add defines for GCC stack protector.
72
73       -f[no-]exceptions
74              (Don't) add define for exception support.
75
76       -fpic, -fPIC, -fpie, -fPIE
77              Add defines for PIC/PIE code.
78
79       -I <directory>
80              Add <directory> to the #include search list.
81
82       -I-    Unset system or site specific include directories.
83
84       -include <file>
85              Include the <file> prior to the main input file.
86
87       -isystem <dir>
88              Look for include files in DIR, if not found in -I's.
89
90       -iquote <dir>
91              Look for #include "file" (with quotes) in DIR.
92
93       -j     Do not output the source line in diagnostics.
94
95       -k     Keep white spaces of input lines as they are.
96
97       -M, -MM, -MD, -MMD, -MP, -MQ target, -MT target, -MF file
98              Output source file dependency line for makefile.
99
100       -m32   Change target CPU from x86_64, ppc64 to i386, ppc, respectively.
101
102       -m64   Change target CPU from i386, ppc to x86_64, ppc64, respectively.
103
104       -[no-]mmx
105              (Un-)define __MMX__.
106
107       -N     Don't predefine any non-standard macros.
108
109       -nostdinc
110              Unset system or site specific include directories.
111
112       -o <file>
113              Output to <file>.
114
115       -P     Don't output #line lines.
116
117       -Q     Output diagnostics to "mcpp.err" (default:stderr).
118
119       -U <macro>
120              Undefine <macro>.
121
122       -undef Same as -N.
123
124       -v     Show version of mcpp.
125
126       -W <level>
127              Set warning level to <level> (OR of {0,1,2,4,8,16}, default:1).
128
129       -w     Same as -W0.
130
131       -z     Don't output the included file, only defining macros.
132
133       Options available with -@std (default) or -@poststd options:
134
135       -+     Process C++ source.
136
137       -2     Enable digraphs.
138
139       -digraphs
140              Enable digraphs.
141
142       -h <n> Re-define the pre-defined macro __STDC_HOSTED__ as <n>.
143
144       -lang-c89
145              Same as -S1.
146
147       -lang-c99, -lang-c9x
148              Same as -S199901L.
149
150       -lang-c++
151              Same as -+.
152
153       -lang-asm
154              Same as -a.
155
156       -pedantic, -pedantic-errors
157              Same as -W7.
158
159       -S <n> Redefine __STDC__ to <n>, undefine old style macros.
160
161       -std=<STANDARD>
162              Specify the standard to which the code should  conform.   <STAN‐
163              DARD> may be one of: c90, c99, iso9899:1990, iso14882, etc.
164              iso9899:<n>, iso14882:<n> : Same as -V <n> (long in decimals).
165
166       -V <n> Redefine __STDC_VERSION__ or __cplusplus to <n>.
167              C with -V199901L specifies C99 mode.
168              C++ with -V199901L specifies C99 compatible mode.
169
170       -x c++ Same as -+.
171
172       Options available with only -@std (default) option:
173
174       -@compat
175              Expand recursive macro more than Standard.
176
177       -3     Enable trigraphs.
178
179       -trigraphs
180              Enable trigraphs.
181
182       -K     Embed macro annotations into comments.
183
184       Options available with -@std (default), -@kr or -@oldprep options:
185
186       -lang-asm
187              Same as -x assembler-with-cpp.
188
189       -x assembler-with-cpp
190              Process "assembler" source.
191
192       Option available on Mac OS X / Apple-GCC:
193
194       -arch <arch>
195              Change  the  target  to  <arch>  (one  of  i386, x86_64, ppc and
196              ppc64).
197
198       Option available on CygWIN:
199
200       -mno-cygwin
201              Change include directory and predefined  macros  for  msvcrt.dll
202              rather than cygwin1.dll.
203

PRAGMA

205       mcpp has the following #pragma directives.
206
207       #pragma once
208              Read the header file only once even if multiply #included.
209
210       #pragma __setlocale( "encoding")
211              Specify  the multibyte character encoding to "encoding".  See -e
212              option for the encodings.
213
214       #pragma MCPP put_defines
215              Putout all the macro definitions currently valid.
216
217       #pragma MCPP debug <args>
218              Start to putout debugging informations.
219                  <args> should be one or more of:
220                  token expand macro_call path if expression memory getc
221
222       #pragma MCPP end_debug <args>
223              Stop to putout debugging informations.
224                  <args> are the same with 'debug'.
225                  No argument specifies all arguments.
226
227       #pragma MCPP push_macro( "MACRO")
228              Save the macro definition to the stack.
229
230       #pragma MCPP pop_macro( "MACRO")
231              Retrieve the macro definition from the stack.
232
233       #pragma MCPP preprocess
234              "Pre-preprocess" the following header files for mcpp.
235
236       #pragma MCPP warning    any message
237              Putout warning "any message".
238

VERSION

240       MCPP V.2.7 (2008/03) for GCC
241

SEE ALSO

243       The full documentation for mcpp are maintained as html  files.   Please
244       see mcpp-manual.html.
245
246
247
248alternative CPP                    Mar 2008                            MCPP(1)
Impressum