cxref-cpp(1)

πŸ’… cxref-cpp β€” the General Commands Manual glow-up

okay bestie, welcome to the manual page for cxref-cpp, a whole icon in the General Commands Manual category πŸŽ€


✨ NAME ✨

cxref-cpp β€” a modified C preprocessor to use with cxref. no cap, that's literally the whole job description πŸ’–


🌸 SYNOPSIS 🌸

cxref-cpp ...

like... it takes stuff. the ... is doing a lot of heavy lifting here and we respect it 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” to make the output available for the source code even better when you're cross-referencing, a modified version of GNU CPP v2.7.2 gets shipped alongside everything, and its name is cxref-cpp. she's not like other preprocessors πŸ’…

this modified C preprocessor lets you have a finer control over some features of the preprocessing that just... don't matter for a compiler. and honestly? relatable. in a standard preprocessor, the preprocessor directives are intended for use only by the preprocessor itself, so passing that information through is not important. it's giving "not my department" energy πŸ™ˆ

with cxref-cpp though, there are some features that are different to the standard GNU CPP, and we're listing all of them, periodt:

  • compared to gcc versions earlier than version 2.8.0 there is an extra option that will output the #include lines from the source file. in version 2.8.0 and later this option is present. so if you're on the old-old gcc, she's got something extra for you πŸ‘‘
  • comments trailing a #include or a #define are not preserved by all versions of gcc even if the -C option is used 😭 this is not important while compiling, but it is useful for documenting. so like, the compiler doesn't care but the docs girlies do.
  • the cxref-cpp program will take on the personality of the installed version of gcc so that the gcc header files can be parsed. main character shapeshifting behavior, honestly ✨ this means that it includes the same default include directory paths and macro definitions. the file that contains these definitions is called cxref-cpp.defines, and it's installed by the cxref-cpp-configure program, or specified by the -cxref-cpp-defines command line option. pick your lane bestie πŸŽ€

πŸ‘‘ OPTIONS πŸ‘‘

  • the same as for gcc β€” yep, all of it, no gatekeeping πŸ’– apart from -cxref-cpp-defines described above, which is the one girl who gets her own mention.

🌈 SEE ALSO 🌈

  • cxref(1)
  • cxref-cpp-configure(1)
  • gcc(1)

fr fr, if you're cross-referencing C source, this is the preprocessor you want in your group chat. go read the friends above πŸ’œ

and that's the whole page, bestie πŸ₯Ή this came out of the General Commands Manual and it's dated May 9, 2004 β€” a vintage queen, an absolute classic, and yes the manual page herself is literally named cxref-cpp(1). obsessed with her, no notes πŸ’…πŸ’–βœ¨