This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] enum enable
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: [RFA] enum enable
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Thu, 19 Jul 2001 05:53:52 -0700
- CC: Jim Blandy <jimb at cygnus dot com>, gdb-patches at sources dot redhat dot com, ac131313 at cygnus dot com
- References: <Pine.SUN.3.91.1010717100642.27733G-100000@is>
Eli Zaretskii wrote:
>
> 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.)
Seems funny to call it bug-free, right after explaining
that you had to make a change in gdb sources to work around
a bug in it...