Re:Is the C++ preprocessor still needed?
by pierrec on Tuesday May 09, 2017 @11:29PM
(#14305721)
As another abuser of the C preprocessor, I'll point out that you can greatly simplify your call to gcc... by not using gcc, just call cpp directly:
should be equivalent, unless I'm missing something. And since somebody was asking why use -H, I'm guessing it's just for the useful verbosity of it. I've found it also causes helpful notices to be printed like "header guards may be useful for the following file..."
[ Parent
| on HN ]
Yes, preprocessor is available as a standalone tool for preprocessing source files in assembly language (.S = input file before preprocessing, .s = output file after preprocessing or source file which does not require preprocessing).
Of course standalone preprocessor can be (ab)used to preprocess Javascript source files and any other files, as grandparent commenter suggested.