From: Jim Blandy <jimb@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: PATCH: Initialize tmp_obstack
Date: Tue, 05 Dec 2006 22:24:00 -0000 [thread overview]
Message-ID: <m3psayvv3r.fsf@codesourcery.com> (raw)
In-Reply-To: <20061205215858.GA30808@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 5 Dec 2006 16:58:58 -0500")
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.
next prev parent reply other threads:[~2006-12-05 22:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-02 18:27 H. J. Lu
2006-12-05 20:40 ` Daniel Jacobowitz
2006-12-05 20:56 ` H. J. Lu
2006-12-05 21:00 ` Daniel Jacobowitz
[not found] ` <12601.163.1.150.229.1165354805.squirrel@webmail.xs4all.nl>
[not found] ` <20061205214306.GA29801@nevyn.them.org>
[not found] ` <20637.163.1.150.229.1165355320.squirrel@webmail.xs4all.nl>
2006-12-05 21:56 ` Daniel Jacobowitz
2006-12-05 21:59 ` Daniel Jacobowitz
2006-12-05 22:24 ` Jim Blandy [this message]
2006-12-05 23:58 ` Daniel Jacobowitz
2006-12-07 14:40 ` Daniel Jacobowitz
2006-12-25 4:00 ` Daniel Jacobowitz
2007-01-16 6:59 ` Daniel Jacobowitz
2007-01-16 21:32 ` Mark Kettenis
2007-01-21 13:07 ` Mark Kettenis
2007-01-21 15:59 ` Daniel Jacobowitz
2007-01-21 17:24 ` Daniel Jacobowitz
2007-02-08 14:21 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3psayvv3r.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox