This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Massive C++ fixes and enhancements
- To: Daniel Berlin <dberlin at redhat dot com>
- Subject: Re: [RFA]: Massive C++ fixes and enhancements
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Thu, 10 Aug 2000 09:37:50 -0700
- Cc: gdb-patches at sources dot redhat dot com
- References: <m3d7jhrxk7.fsf@dan2.cygnus.com>
Daniel,
My comments on your patch:
1) I notice that you're still getting rid of the do { ... } while (0)
in SYMBOL_INIT_DEMANGLED_NAME... I realize that you don't like this
construct, but if someone decides to use SYMBOL_INIT_DEMANGLED_NAME
as part of an if-then-else construct somewhere, you'll save them a
lot of grief. (If you really, really don't like this, then just
make it a function.)
2) Watch your indentation. E.g, the following hunk from
decode_line_1() doesn't look right to me:
--- 2577,2602 ----
}
else
is_quote_enclosed = 0;
+ tryagain:
for (; *p; p++)
{
if (p[0] == '<')
{
char *temp_end = find_template_name_end (p);
! if (!temp_end && !triedonce)
! {
! triedonce=1;
! is_quote_enclosed=1;
! p=*argptr;
! if (has_comma)
! *ii=',';
! s=NULL;
! goto tryagain;
! }
! else if (!temp_end && triedonce)
! {
error ("malformed template specification in command");
+ }
p = temp_end;
}
/* Check for the end of the first half of the linespec. End of line,
Here's how (a portion of it) ought to look:
! if (!temp_end && !triedonce)
! {
! triedonce=1;
! is_quote_enclosed=1;
! p=*argptr;
! if (has_comma)
! *ii=',';
! s=NULL;
! goto tryagain;
! }
! else if (!temp_end && triedonce)
! {
error ("malformed template specification in command");
+ }
Also, note that GNU coding standard doesn't require the braces around
the call to error(). I.e, you could've left that part of the original
code alone.
3) You might want to get into the habit of having separate source
and build trees.