Re: [patch] separate system defines from user defines
Stefan Seefeld <[email protected]> Fri, 18 May 2007 10:32:05 -0400
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Bernhard Fischer wrote:
> Hi,
>=20
> consider:
>=20
> $ cat no.c=20
> #undef nonono
> #define nonono 1
>=20
> Current trunk rejects this with:
> $ synopsis -p C -o /dev/null -Dnonono no.c
> /tmp/i/no.c(1): warning: #undef may not be used on this predefined name=
: nonono
> Error: CppError: /tmp/i/no.c:1 : warning: #undef may not be used on thi=
s predefined name: nonono
(Synopsis isn't clever enough to recognize the special file name '/dev/nu=
ll', so
the above will generate an error since it can't deal with the '/dev/null.=
i' this
would typically create. Just leaving out the -o option may have the
effect you want, though, I believe.)
> The problem arises since currently all flags are treated as
> "predefined", from wave's perspective, and predefined macros per defaul=
t
> are not to be undefined unless explicitely requested --
> remove_macro_definition(token,bool even_predefined=3Dfalse).
>=20
> The attached patch introduces a separation between defines that come
> from the emulator and the user. The former are added with
> is_predefined=3Dtrue, whereas flags given by the user are not=B9.
>=20
> Stefan, ok to apply?
Yes. Patch applied, bug143 closed. Thanks a lot !
Regards,
Stefan
--=20
...ich hab' noch einen Koffer in Berlin...