This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] enum enable
- To: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Subject: Re: [RFA] enum enable
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Tue, 17 Jul 2001 10:07:49 +0300 (IDT)
- cc: msnyder at redhat dot com, gdb-patches at sources dot redhat dot com, ac131313 at cygnus dot com
On 16 Jul 2001, Jim Blandy wrote:
> Why are the following changes necessary? Structure members aren't in
> the global namespace:
>
> > (struct breakpoint): Rename the `enable' member to `enable_state'.
> > (args_for_catchpoint_enable): Rename the `enable' member to
> > `enable_p'. All users changed.
> > (struct tracepoint): The member `enabled' is now `int enabled_p'.
> > * printcmd.c (struct display): The `status' member is now an int.
> > * memattr.h (struct mem_region): Rename the `status' member to
> > `enabled_p'.
In addition to Andrew's request to change that, GCC 2.7.2.1 barfs if
it sees the declaration of a member `enable' together with a prototype
of a function `enable' in the same compilation unit. In my case, the
function is declared in one of the system headers, so I guess GCC sees
it first and protests when the same identifier appears in a struct.
(Yes, I know, GCC 2.7.2.1 is old, but I still use it on one of my
machines because, unlike 2.9x series, it is remarkably stable and
bug-free. I use it as a ``reference implementation'' whenever I have
obscure problems with code which behaves in some weird fashion.)