This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Command line assertions made easier
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: cpplib: Command line assertions made easier
- From: "Zack Weinberg" <zackw at Stanford dot EDU>
- Date: Tue, 31 Oct 2000 13:20:29 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20001031204247.A20390@daikokuya.demon.co.uk>
On Tue, Oct 31, 2000 at 08:42:47PM +0000, Neil Booth wrote:
> Zack suggested this back in April I think. This allows specifying
> assertions on the command line, like
>
> -A predicate=answer
>
> rather than
>
> -A predicate(answer)
>
> (though the latter is still allowed). The former does not fall afoul
> of shell special characters.
And there was much rejoicing.
Maybe you could point out the advantage of the new syntax in the cpp
documentation?
> How to get GCC to use this now? Having to quote the output of -v is
> a royal pain it would be nice to relieve ourselves of permanently.
The -A switches come from the target config files. We need to go
through them all, or at least the ones anyone cares about, and replace
the old syntax with the new. It should be safe to do this with sed and
then read over the patch... in gcc/config:
for file in *.h */*.h; do
sed '/-A/s/-A\([a-zA-Z0-9_][a-zA-Z0-9_]*\)(\([^)][^)]*\))/-A\1=\2/g' \
<$file >$file.new
../move-if-change $file.new $file
done
zw