Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: token pasting (was: how widespread is this cpp bug?) Keywords: cpp whitespace bug Message-ID: <9056@smoke.BRL.MIL> Date: 4 Dec 88 05:20:25 GMT References: <49179@pyramid.pyramid.com> <6625@csli.STANFORD.EDU> <9026@smoke.BRL.MIL> <1747@solo3.cs.vu.nl> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <1747@solo3.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >Why didn't the ANSI committee legalize that current practice, instead of >defining a new paste operator (##)? Because there were probably more C implementations that followed the explicit rule stated in the base document (K&R 1st Ed.) than that violated it. Although X3J11 couldn't legalize this behavior, it did recognize the utility of token pasting, which is why it designed a legal solution to it. I suggest adding a paste(a,b) macro to your equivalent of , and define paste(a,b) according to the specific implementation. Be advised that many pre-ANSI C implementations cannot implement this macro.