From: David Gordon Hogan <dhog@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] bug/feature report (long)
Date: Tue, 7 May 2002 18:02:08 -0400 [thread overview]
Message-ID: <adedb3e6a5713d19e1960ab74062218a@plan9.bell-labs.com> (raw)
> void
> main()
> {
> int *ptr;
> print("%ux\n", ptr);
> }
> p9% diff norm.c thrd.c
> 6c6
> < main()
> ---
> > threadmain()
>
> i guess, threadmain does not initialize pointers to nil.
Local variable are not initialized in general. In the case
of main(), it just happens to be nil (zero) because the
stack segment hasn't had a chance to get polluted yet.
A useful tip: always use the -w flag to 8c et al. Take
any warnings seriously -- they are often caused by
programming errors. In this case, you would be warned
that ptr is used but not set. And indeed it isn't.
next reply other threads:[~2002-05-07 22:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-07 22:02 David Gordon Hogan [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-05-07 22:27 forsyth
2002-05-07 22:09 andrey mirtchovski
2002-05-07 21:51 andrey mirtchovski
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=adedb3e6a5713d19e1960ab74062218a@plan9.bell-labs.com \
--to=dhog@plan9.bell-labs.com \
--cc=9fans@cse.psu.edu \
/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;
as well as URLs for NNTP newsgroup(s).