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]
Other format: [Raw text]

Re: [commit] Deprecate remaining STREQ uses


Date: Mon, 24 Nov 2003 11:41:36 -0500
From: Andrew Cagney <cagney@gnu.org>

> > Sorry, I don't get the rationale for renaming STR* into
> DEPRECATED_STR*. Are we going to throw away the code that used
> STREQN/STREQ? If not, I don't see any good reasons to do this, as
> renaming the macro doesn't get us any closer to the goal of replacing
> them with a simple call to the appropriate str* function.
> > Could you please explain why the renaming is a good idea?


Note that I'm renaming the _remaining_ STR*s and not all references.


I must be dense today, because I still don't get it.

What is the importance of ``remaining'' in this case?  I understand
that you replaced some of the uses of STR* macros, those that you
could test on the system(s) you have available to you, with the direct
call to the str* functions.  I can also understand (although I
basically disagree, see below) why you don't want to replace those
uses which you cannot test.  But why does it make sense to rename
them?  Why not just leave them alone?

What am I missing?

To ensure that future patches don't continue to use these macros.


I don't think simply replacing the macros with their expansion could
introduce bugs.  If you don't trust your eyes and hands, perhaps
Emacs's c-macro-expand command (or some other similar automated tool)
could help.

(it isn't a question of trusing eyes or hands but accepting that humans are falible). Anyway, so EMACS has an automated tool I'll go through with that. Expect questions ;-) Do I need to run ETAGS first?


Andrew



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