Path: utzoo!attcan!uunet!mailrus!cornell!calvin!richard From: richard@calvin.EE.CORNELL.EDU (Richard Brittain) Newsgroups: comp.lang.c Subject: Re: C's Limited Macro Capabilities Summary: Complex macros also tend to break source code analysis tools Message-ID: <3311@calvin.EE.CORNELL.EDU> Date: 4 Dec 89 03:42:14 GMT References: <69517@psuecl.bitnet> <11250@csli.Stanford.EDU> Reply-To: richard@calvin.spp.cornell.edu. (Richard Brittain) Organization: Cornell Space Plasma Physics Group Lines: 21 In article <11250@csli.Stanford.EDU> poser@csli.stanford.edu (Bill Poser) writes: > >A simple macro processor, like the one we have, is a Good Thing. >I am not so sure that a more powerful macro processor along the >same lines would be. For one thing, the syntax of macro languages >is nasty, and not conducive to good programming practice, and when one >writes complex macros, in effect one is making use of a meta-programming >language. So my gut reaction to proposals for non-trivial extensions to >cpp is generally one of the following, depending on the case at hand: ..... examples deleted Another problem with using complex macros, particularly if they affect function declarations or variable/array declarations, is that most source code analysis tools, pretty printers etc. will break. Running them on the output of cpp doesn't cut it if part of the output involves line numbers into the source file. Richard Brittain, School of Elect. Eng., Upson Hall Cornell University, Ithaca, NY 14853 ARPA: richard@calvin.spp.cornell.edu UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard