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: Initialize tmp_obstack


Daniel Jacobowitz <drow@false.org> writes:
> On Tue, Dec 05, 2006 at 04:56:39PM -0500, Daniel Jacobowitz wrote:
>> I think we're being overly optimistic if we expect GCC to get it right
>> all the time.  In fact, I asked a bunch of GCC developers about it on
>> IRC and the best response I got was "then you are screwed".  Or Diego's
>> explanation:
>> 
>> > We don't explicitly try to handle it.  it's mostly side-effect of
>> > various optimizations.  some times it's jump-threading, others it's
>> > PRE, others it's CCP, others it's VRP.
>> 
>> > that irritates the hell out of me.  we depend on optimizations for
>> > this warning.
>> 
>> I know that's a widely held position.
>
> For the record, his followup makes that come out a bit differently:
>
>> I would love for someone to tackle this particular warning in
>> an explicit and deterministic way.

Solving it correctly is Turing-complete; I wonder what Diego had in
mind.

One alternative I've seen is Java's "definite assignment" rule: the
language spec actually dictates a (not entirely dumb but not too hot
either) flow analysis that is used to decide (if I remember right)
whether you must initialize a varable or not.  It's not The C Way to
require initialization, but GCC could simply fix a particular
algorithm for the sake of producing that warning.


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