Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/AA) Newsgroups: comp.unix.wizards Subject: Re: cpp vs. m4 for .s files Message-ID: <1991May3.012859.14305@NCoast.ORG> Date: 3 May 91 01:28:59 GMT References: <1991May1.192158.13352@sctc.com> <16031@smoke.brl.mil> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/AA) Followup-To: comp.unix.wizards Organization: North Coast Public Access Un*x (ncoast) Lines: 27 As quoted from <16031@smoke.brl.mil> by gwyn@smoke.brl.mil (Doug Gwyn): +--------------- | In article <1991May1.192158.13352@sctc.com> scott@sctc.com (Scott Hammond) writes: | -Unix source tends to use m4 for macro and constant substitution. | -I was asked why cpp wouldn't work just as well, but I don't know. Is | -there any reason one way or the other for choosing m4 vs. cpp for | -assembly language files? | | Don't use cpp for anything, please. It need not even exist. +--------------- ...although I have a cpp-to-m4 preprocessor about half-functional (it doesn't do #if and botches #ifndef ... #else). (PLEASE don't ask me for it, I've about 30 projects at the half-to-75%-done phase and at the rate I'm going none of them will get finished!) In any case, m4 wins over cpp because m4 is smarter. You can do things with m4 that cpp can't even attempt, like decomposing or altering tokens via translit(), substr(), etc. (Admittedly, getting the hang of m4 can make one prematurely gray....) ++Brandon -- Me: Brandon S. Allbery Ham: KB8JRR/AA 10m,6m,2m,220,440,1.2 Internet: allbery@NCoast.ORG (restricted HF at present) Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH