News for hackers. Stuff that matters.
Re:Is the C++ preprocessor still needed? by ndesaulniers on Tuesday May 09, 2017 @09:49PM (#14305352)
looked up these flags, since I didn't know all of them:

-C: compile but do not link (I think this is covered by -E)

-E: stop after running the preprocessor

-H: print the name of each header file included, indenting child #includes (what do you use this for? is it printed to stderr?)

-P: inhibit the generation of line markers from the preprocessor (I've used this before, but can't recall the problem it solves? Not expanding __LINE__?)

-nostdinc: do not search standard system directories for header files (/usr/include, /usr/local/include, ..., this is standard in the Linux kernel, since there is no libc)

-undef: do not predefine any system-specific or GCC macros (probably to not expand occurrences of sequences like "__GNUC__" and others from unexpectedly being expanded).

-x <language>: specify the language, rather then letting the compiler guess based on the file extension (is this required?)

Re:Is the C++ preprocessor still needed? by Goopplesoft on Tuesday May 09, 2017 @11:45PM (#14305782)
Thanks. Also, this site also seems to have args from man pages: https://explainshell.com/explain?cmd=gcc+-C+-E+-H+-P+-nostdi...
Re:Is the C++ preprocessor still needed? by ndesaulniers on Wednesday May 10, 2017 @02:55AM (#14306360)
That's a neat utility! Thanks for sharing.
Re:Is the C++ preprocessor still needed? by ksherlock on Wednesday May 10, 2017 @01:00PM (#14309728)
> -P: inhibit the generation of line markers from the preprocessor (I've used this before, but can't recall the problem it solves? Not expanding __LINE__?)

It prevents #line directives which are useful for a C compiler but erroneous for javascript.

Re:Is the C++ preprocessor still needed? by dima55 on Wednesday May 10, 2017 @01:37AM (#14306132)
you mixed up -c and -C. Here he's preserving comments