ucpp(1)
=======
:doctype: manpage
:manmanual: ucpp Manual
:mansource: ucpp

== Name

ucpp - C preprocessor

== Synopsis

*ucpp* [_options_] [_file_]

== Description

*ucpp* is a C preprocessor mostly compatible with ISO-C99.
It is rather strict and uses only a small amount of memory. It uses
standard input as primary input if no file argument is given.

== Options

There are several classes of options.

*Language Options*

*-C*:: keep comments in the output.

*-s*:: if a rogue &#39;#&#39; is encountered, do not emit an error and keep it in
the output.

*-l*:: suppress the emission of &#39;#line&#39; directives in the output.

*-lg*:: convert the &#39;#line&#39; to the gcc-style equivalent.

*-CC*:: disable C++-like comments (a &#39;//&#39; begins a comment, up to the end
of the line). Use this option to get closer to C90 behaviour.

*-a, -na*:: handle assertions (defined with #assert);
*-a* also defines the standard assertions _#machine_,
_#cpu_ and _#system_ (see *-e* to get the local definition of such assertions).

*-a0*:: disable assertion support.

*-V*:: disable support for macros with a variable number of arguments: in C99,
a macro may be declared with _..._ as the last argument; inside the replacement list,
`__VA_ARGS__` is replaced with the optional extra arguments given in the call to the macro.
Use this option to get closer to C90 behaviour.

*-u*:: enable UTF-8 support: with this option, the source is considered as
an ISO/10646 source, encoded in UTF-8. Characters represented as two bytes
or more are considered as alphabetic characters, like letters, and
therefore usable in identifiers. These characters hold the same
syntactic value than the corresponding Universal Character Names.

*-X*:: enable *-a, -u* and *-Y.* This should make
*ucpp* behave closer to what is requested from a "modern" C preprocessor.

*-c90*:: enable *-V* and *-CC,* and do not define `__STDC_VERSION__`.
This should make *ucpp* mimic older C90 behaviour.

*-t*:: disable trigraph support; this seems to be required for some legacy code.

*Warning Options*

*-wt*:: emit a final warning when trigraphs are encountered.

*-wtt*:: emit warnings for each trigraph encountered.

*-wa*:: emit annoying warnings (these are usually useless).

*-w0*:: suppress standard warnings.

*Directory Options*

*-I* _directory_::
*-I* _directory_:: add _directory_ to the include path, before the standard include path.

*-J* _directory_::
*-J* _directory_:: add _directory_ to the include path, after the standard include path.

*-zI*:: do not use the standard (compile-time) include path.

*-M*:: emit only the names of encountered files, separated by spaces; this is
intended for automatic generation of Makefile dependencies.

*-Ma*:: do the same as *-M* but also for system files.

*-o* _file_:: direct the output to _file_ instead of standard output.

*Macro Options*

*-D* _macro_:: predefine _macro_ with content *1.*

*-D* _macro=def_:: predefine _macro_ with the content _def._

*-U* _macro_:: undefine _macro._

*-Y*:: predefine system-dependent macros.

*-Z*:: do not predefine special macros such as `__TIME__`.

*-A* _foo(bar)_:: add _foo(bar)_ to the list of assertions.

*-B* _foo(bar)_:: remove *-B* _foo(bar)_ of the list of assertions; you may also use
*-B* _foo_ to remove all *-B* _foo(xxx)_ from the list of assertions.

*-d*:: instead of normal output, emit &#39;#define&#39; directives representing all
macros defined during processing.

*-e*:: instead of normal output, emit &#39;#assert&#39; directives representing all
assertions defined during processing.

*Miscellaneous Options*

*-v*:: print version number, include path and (optionally) defined assertions.

*-h*:: print some help.

== Environment

*ucpp* is not itself affected by environment variables. However, it uses
library functions that might be affected, depending on the system.

== Author

Thomas Pornin <pornin@bolet.org>

== Bugs

*ucpp* is considered stable software. However improbable it is, please report
a ticket if the latest version, available from this site:

https://gitlab.com/scarabeusiv/ucpp

has the bug.
