From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f849b,b8d52151b7b306d2 X-Google-Attributes: gidf849b,public X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-17 18:34:44 PST Newsgroups: comp.arch.embedded,comp.lang.ada Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!sparc!albert From: albert@spenarnc.xs4all.nl (Albert van der Horst) Subject: Re: Certified C compilers for safety-critical embedded systems Organization: Dutch Forth Workshop Message-ID: References: <3fe00b82.90228601@News.CIS.DFN.DE> <3ff9df16.3024 <1073487133.232393@master.nyc.kbcfp.com> Date: Fri, 16 Jan 2004 20:13:25 GMT Xref: archiver1.google.com comp.arch.embedded:7704 comp.lang.ada:4514 Date: 2004-01-16T20:13:25+00:00 List-Id: In article <1073487133.232393@master.nyc.kbcfp.com>, Hyman Rosen wrote: >Frank J. Lhota wrote: >> But learning about m4 is a valuable exercise! It is a flexible and powerful >> preprocessor with far more capabilities that the C preprocessor. > >One of the things you can learn about m4 is that it has no way of >dealing specially with character strings, so if you're using it on >Ada programs and innocently want to do > Text_IO.Put_Line("This is a UNIX system!"); >you could very easily wind up with > Text_IO.Put_Line("This is a 1 system!"); Of course it does. You should have quoted it. Text_IO.Put_Line(`"This is a UNIX system!"'); There is a good reason that m4 has its own quotes. With it comes utmost flexibility, and a lot of headaches. Sometimes you want expansion: void signon() { printf("NAME"); printf("SUPPLIER"); printf("VERSION"); printf("DATE"); } And if you dislike ` bracketing for m4 use changequote() Unfortunately this breaks down when the string contains a single quote. I use m4 extensively, but I can appreciate that c-folks prefer a c-aware pre-processor in behalf of the above pit falls. Nowadays I would say the way to go is xml. You then can never hide that something is to be expanded, but maybe that is just as well. -- Groetjes Albert. -- Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS One man-hour to invent, One man-week to implement, One lawyer-year to patent.