This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH v4] Make chained function calls in expressions work


Siva Chandra wrote:
> On Tue, Nov 4, 2014 at 5:38 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > Yes, having an additional flag in struct expression would fix the safety
> > issue.  Moving initialization to evalute_subexp if *pos == 0 would then
> > no longer be safety issue, but simply enabling use of temporaries in more
> > cases.
> 
> Since I have my code already setup in this fashion, I would prefer to
> go this route unless you see an advantage of going with the solution
> you suggest below.

Well, I don't think there are any functional advantages as such, but the
implementation looks a bit cleaner (all the details of temporary handling
done in infcall.c; fewer interactions between eval.c and infcall.c;
shorter patch overall).

> > You mean "Any two or more lines in code should be wrapped in braces, even
> > if they are comments, as they look like separate statements"?  I don't think
> > this is intended to apply to cases like the above where a single statement
> > just had to split into multiple lines since it doesn't fit into one.
> > This case will never "look like separate statements".  In any case, all
> > the existing precedent in GDB does not have extra braces in that case.
> 
> Sorry for picking this. I point out because I was asked to put braces
> for cases like this in the past. Example:
> extension.c:get_xmethod_arg_types.

I wouldn't have required the braces there either :-)  But in any case, I
don't really care very much; I'd be happy to approve the patch with or
without braces in this place ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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