This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] enum enable


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]