Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: gcc needs a curly bracket matching/counting function Date: Tue, 20 Dec 2016 14:31:42 -0800 Organization: None to speak of Lines: 27 Message-ID: References: <87zijq5y6s.fsf@bsb.me.uk> <4c33eed2-ece9-4616-b274-e0752353b6c2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="b8044c752840ceb89291b47395d36dfc"; logging-data="5456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RwP6xodWaNhPwwstR7OVM" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:4cwUVEhZygeBnYGp67cKkRJfOBg= sha1:rCFcFY4U7Ya1jhKmTGHzjk+iNtI= Xref: csiph.com comp.lang.c:99945 BartC writes: [...] > I think I would find it easier to write a pre-processor than try and > source, build and interface to someone else's. Seriously?? > But if the OP is using gcc, they can get preprocessed output out of it > using gcc -E, and play around with that. > > That wouldn't be a satisfactory solution for me as it would need to be > self-contained, and more efficient. If I run gcc -E on this 2-line program: > > #include > int main(void) {MessageBox(0,"There","Hi",0);} > > I get 82,000 lines of preprocessed output. And how many lines of output would you expect to get from your own preprocessor? If you don't get 82,000 lines, you're probably doing something wrong. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"