From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Bothner To: drepper@cygnus.com (Ulrich Drepper) Cc: law@cygnus.com, egcs@cygnus.com, brolley@cygnus.com Subject: Re: once we have cpplib... Date: Fri, 10 Apr 1998 00:39:00 -0000 Message-id: <199804100444.VAA12731@cygnus.com> References: X-SW-Source: 1998-04/msg00417.html > I think there is an easy way to keep compatibility. When the > integrated cpp is supposed to be used give cc1 (cc1plus, ...) an extra > argument. The main difference between cc1 needs to know whether it should pre-process the input is if it sees an identifier that matches a builtin macro - should that be expanded or not? Since such macros tend to be in the implementor's name-space, I can't think of valid code which would be harmed by having cc1 do the macro-expansion, even if it already was processed by cpp. But there is an easy way cc1 can tell if the input was already processed by cpp: Look at the first line. If it looks like: # 1 "foo.c" then it is cpp output, since such a line is not a valid pre-processor directive, I believe. --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner