CPP(1) GNU CPP(1) cpp - C (SYNOPSIS) cpp [-Dmacro[=defn]...] [-Umacro] [-Idir...] [-iquotedir...] [-M|-MM] [-MG] [-MF filename] [-MP] [-MQ target...] [-MT target...] infile [[-o] outfile] . cpp gcc . GCC . (DESCRIPTION) C cpp C . . C C C++ Objective-C . . C . . C . Makefile (hard tabs) Makefile . cpp C . ( Ada ) . . -traditional-cpp . C C++ . . GNU . . GNU M4 . C . GNU C ISO C . GNU C . ( ) . ISO C -std=c90 -std=c99 -std=c11 -std=c17 . -pedantic . ISO . ISO . Traditional Mode . CPP GNU CPP . (OPTIONS) cpp : infile outfile. infile #include . outfile . infile outfile - infile outfile . - . -o outfile . = : -Ifoo -I foo . : -dM -d -M . -D name name 1 . -D name=definition definition #define . (newline) . (quoting) . ( ) . . sh csh -D'name(args...)=definition' . -D -U . -imacros file -include file -D -U . -U name name -D . -include file file "#include "file"" . file . "#include "..."" . -include . -imacros file -include file . . . -imacros -include . -undef GCC . . -pthread POSIX . (linking) . GNU/Linux Unix x86 Cygwin MinGW . -M make . make ( -include -imacros) . ( -MT -MQ) . \-newline . . -dM . -MF DEPENDENCIES_OUTPUT . . -M -E -w . -MM -M . #include -MM . -MF file -M -MM . -MF . -MD -MMD -MF . file - stdout ..IP "-MG" 4 -M -MG . "#include" . -MG . makefile . -Mno-modules . -MP CPP (phony target) . make Makefile . : test.o: test.c test.h test.h: -MT target . CPP .c (object) . (target) . -MT . -MT -MT . -MT '$(objpfx)foo.o' : $(objpfx)foo.o: foo.c -MQ target -MT Make (quote) . -MQ '$(objpfx)foo.o' : $$(objpfx)foo.o: foo.c -MQ . -MD -MD -M -MF file -E . file -o . .d .d . -MD -E -o -E -o (object) . -E -MD . -MMD -MD . -fpreprocessed . (trigraph) . (comments) -C . (tokenizer) (front ends) . .i .ii .mi -fpreprocessed . GCC -save-temps . -fdirectives-only . -E -fpreprocessed . -E "#define" "#ifdef" "#error" . (trigraph) . -dD . -fpreprocessed . "__LINE__" . "-E -fdirectives-only" . -E -fpreprocessed -fpreprocessed . "-E -fdirectives-only" . -fdollars-in-identifiers $ . -fextended-identifiers (universal character names) . C99 ( C) C++ . -fno-canonical-system-headers (canonicalization) . -fmax-include-depth=depth #include . 200 . -fsearch-include-path[=kind] #include . C++20 : g++ -c -std=c++20 -fmodules -fsearch-include-path bits/stdc++.h bits/std.cc kind user "#include "..."" system "#include <...>" . -ftabstop=width (tab stops). . 1 100 . 8 . -ftrack-macro-expansion[=level] (tokens) . . . level . 0 level . 1 . . 2 . . 2 . "-ftrack-macro-expansion=2" . -fmacro-prefix-map=old=new old "__FILE__" "__BASE_FILE__" new . . new . "__builtin_FILE()" . -ffile-prefix-map -fcanon-prefix-map. -fexec-charset=charset (execution character set) . UTF-8 . charset "iconv" . -fwide-exec-charset=charset (wide execution character set) . UTF-32BE UTF-32LE UTF-16BE UTF-16LE "wchar_t" big-endian little-endian . -fexec-charset charset "iconv" "wchar_t" ..IP "-finput-charset=charset" 4 GCC . (locale) GCC UTF-8 . . . charset "iconv" . -fworking-directory . . GCC . -fno-working-directory . -P "#line" . -A predicate=answer (assertion) predicate answer . -A predicate(answer) . -A -predicate=answer predicate answer . -C . . -C . # . -CC . -C . -C -CC C++ C . . -CC lint . -P . C . -traditional -traditional-cpp C ISO C . GCC C -E CPP . -trigraphs (trigraphs) ISO C . ?? ISO C . ??/ \ '??/n' . GCC . -std -ansi . -remap ( MS- DOS) . -H . #include . ...x ...! . -dletters letters . . letters GCC . letters . -dM #define . . foo.h touch foo.h; cpp -dM foo.h . -dD -dM #define . . -dN -dD . -dI #include . -dU -dD #undef . -fdebug-cpp GCC . CPP -E . . GCC -E . -I dir -iquote dir -isystem dir -idirafter dir dir . dir = $SYSROOT = $SYSROOT sysroot --sysroot -isysroot . -iquote "#include "file"" . -I -isystem -idirafter "#include "file"" "#include " . . : 1. include ..IP "2." 4 include -iquote . 3. -I . 4. -isystem . 5. . 6. -idirafter . -I . -isystem . -isystem -idirafter . include -isystem -I -I . include . GCC "#include_next" . -nostdinc / -isystem . -I- include . . -I -I- -iquote -I- . -I -I- "#include "file"" "#include " . -I -I- #include . -I- "#include "file"" . -I- . -iprefix prefix prefix -iwithprefix . / . -iwithprefix dir -iwithprefixbefore dir dir -iprefix include . -iwithprefixbefore -I -iwithprefix -idirafter . -isysroot dir --sysroot ( Darwin ). --sysroot . -imultilib dir dir C++ . -nostdinc . -I -iquote -isystem / -idirafter ( ) . -nostdinc++ C++ . ( C++ .) --embed-dir=dir dir "#embed" "__has_embed" . "#embed" . dir = $SYSROOT = $SYSROOT sysroot --sysroot -isysroot . -Wcomment -Wcomments /* /* - // . -Wall . -Wtrigraphs (trigraphs) . . -Wall . -Wall trigraph . -Wall -trigraphs -Wall -Wno-trigraphs . -Wundef "#if" . . -Wexpansion-to-defined defined ( #if ) . . -Wpedantic -Wextra . -Wunused-macros . . . (built-in) include . : . . (dummy) : #if defined the_macro_causing_the_warning #endif -Wno-endif-labels "#else" "#endif" . : #if FOO ... #else FOO ... #endif FOO "FOO" () . ..SH " (ENVIRONMENT)" CPP . include . -I -M . GCC . CPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH OBJC_INCLUDE_PATH PATH (header) . "PATH_SEPARATOR" GCC . Microsoft Windows - . CPATH -I -I . . . -isystem -isystem . . . CPATH ":/special/include" -I. -I/special/include . DEPENDENCIES_OUTPUT Make . . DEPENDENCIES_OUTPUT Make . file target target file . -MM -MF -MT . SUNPRO_DEPENDENCIES DEPENDENCIES_OUTPUT ( ) -MM -M . . SOURCE_DATE_EPOCH UNIX "__DATE__" "__TIME__" . SOURCE_DATE_EPOCH UNIX ( ) 01 Jan 1970 00:00:00 ASCII "date +%s" GNU/Linux %s "date" . ..SH " (SEE ALSO)" gpl(7) gfdl(7) fsf-funding(7) gcc(1) Info cpp gcc. (COPYRIGHT) Copyright (c) 1987-2025 Free Software Foundation, Inc. / << >> (GNU Free Documentation License) . gfdl(7) . . (a) ( ) (b) ( ) . (a) FSF : A GNU Manual (b) FSF : You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development. gcc-15.2.0 2025-08-08 CPP(1)