UCPP(1)

πŸ“¦
version 1.3.5 Β· 2 versions
, in alpine 3.24, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’… UCPP β€” like, the C preprocessor, bestie πŸ’…

okay so welcome to the UCPP(1) page, general commands manual energy, and honestly? she's a whole vibe. let's get into it 🫢


✨ NAME ✨

ucpp β€” the C preprocessor. that's it. that's the name. iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

ucpp [ options ] [ file ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so ucpp is a C preprocessor that's mostly compatible with ISO-C99 πŸ’–. she is rather strict (periodt, she has boundaries) and she uses only a small amount of memory β€” lowkey thrifty, highkey efficient, we love a resource-conscious queen πŸŽ€.

if you don't hand her a file argument? she just uses standard input as her primary input. no notes. πŸ’…


⭐ OPTIONS ⭐

there are several classes of options, babes. buckle up, we're going through all of them. no skimming, no skipping, fr fr 🌈


πŸ’œ Language Options πŸ’œ

  • -C β€” keep comments in the output. she heard you like comments so she kept them πŸ’–
  • -s β€” if a rogue # shows up, she does not emit an error and keeps it in the output. rogue # rights 🫢
  • -l β€” supress the emission of #line directives in the output.
  • -lg β€” convert the #line to the gcc-style equivalent. glow-up edition ✨
  • -CC β€” disable C++-like comments (where a // begins a comment, up to the end of the line). use this one if you wanna get closer to C90 behaviour.
  • -a, -na β€” handle assertions (the ones defined with #assert); -a also defines the standard assertions #machine, #cpu and #system (peep -e if you want the local definition of those assertions). πŸ‘€
  • -a0 β€” disable assertion support. bye bestie 😭
  • -V β€” disable support for macros with a variable number of arguments. so like: in C99, a macro may be declared with ... as the last argument, and inside the replacement list, __VA_ARGS__ gets 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 on, the source is considered an ISO/10646 source, encoded in UTF-8. characters represented as two bytes or more are considered alphabetic characters, like letters, and are therefore usable in identifiers. these characters hold the same syntactic value as the corresponding Universal Character Names. unicode girls rise πŸ’…βœ¨
  • -X β€” enable -a, -u and -Y. this should make ucpp behave closer to what's requested from a "modern" C preprocessor. she's modern, she's evolved πŸ¦‹
  • -c90 β€” enable -V and -CC, and do not define __STDC_VERSION__. this should make ucpp mimic older C90 behaviour. throwback era πŸŽ€
  • -t β€” disable trigraph support; this seems to be required for some legacy code. respect the elders 🫑

πŸ’€ Warning Options πŸ’€

  • -wt β€” emit a final warning when trigraphs are encountered.
  • -wtt β€” emit warnings for each trigraph encountered. not her being thorough πŸ’€
  • -wa β€” emit annoying warnings (these are usually useless, ngl πŸ™ˆ)
  • -w0 β€” supress standard warnings. silence is golden, periodt.

πŸ“ Directory Options πŸ“

  • -Idirectory
  • -I directory β€” add directory to the include path, before the standard include path.
  • -Jdirectory
  • -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. makefile girlies stay winning πŸ”₯
  • -Ma β€” do the same as -M but also for system files.
  • -o file β€” direct the output to file instead of standard output.

🧚 Macro Options 🧚

  • -Dmacro β€” predefine macro with content 1.
  • -Dmacro=def β€” predefine macro with the content def.
  • -Umacro β€” undefine macro.
  • -Y β€” predefine system-dependant macros.
  • -Z β€” do not predefine special macros such as __TIME__.
  • -Afoo(bar) β€” add foo(bar) to the list of assertions.
  • -Bfoo(bar) β€” remove foo(bar) of the list of assertions; you may also use -Bfoo to remove all -Bfoo(xxx) from the list of assertions.
  • -d β€” instead of normal output, emit #define directives representing all macros defined during processing.
  • -e β€” instead of normal output, emit #assert directives representing all assertions defined during processing.

🌈 Miscellaneous Options 🌈

  • -v β€” print version number, include path and (optionaly) defined assertions.
  • -h β€” print some help. she's helpful like that 🫢

🌸 ENVIRONMENT 🌸

ucpp is not itself affected by environment variables. however, she uses library functions that might be affected, depending on the system. so like… not her fault, blame the libs πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Thomas Pornin <pornin@bolet.org> β€” the mastermind, the main character, the one who wrote her πŸ’œ


πŸ’€ BUGS πŸ’€

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

https://gitlab.com/scarabeusiv/ucpp

has the bug. she's stable but she's not perfect, and honestly? relatable 😭


ok that's the whole page bestie, you're officially ucpp-pilled 🧠✨ go forth and preprocess responsibly πŸ’–

and that's a wrap on this General Commands Manual entry, dated Oct 21 2000 β€” yes she's a vintage queen and she still serves πŸ‘‘πŸ’…

πŸ“¦ where this page comes from