🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4992

Re: Initializing a variable in terms of itself

#4992
From: Timothy A. McDaniel
Date: Sat, 06 Apr 1996 16:18
23 lines
1240 bytes
In article <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>,
James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
>In article <4jpj9l$ik9@cnn.Princeton.EDU> tim@franck (Tim Hollebeek)
>writes:
...
>|>     int x = x;
...
>The reference to `x' in the initialization expression is not, per se,
>illegal.  The variable is declared, and available for use, as soon as
>the compiler sees the `=' sign.

So
    void *x = &x;
would be legal, then, and x would point to itself?  (Or would it have
to be
    void *x = (void *) &x;
?)

-- 
                             Tim McDaniel
                        Reply-To: tmcd@crl.com
                   Work account is mcdaniel@cpm.com
              Never use mcdaniel@mcdaniel.dallas.tx.us.
Technical Details
Message-ID: <4k65h6$dfe@nntp.crl.com>
Path: arc1-ca.pugleaf.net!mcdaniel.dallas.tx.us!not-for-mail
References: <4jpj9l$ik9@cnn.Princeton.EDU> <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mcdaniel.dallas.tx.us!not-for-mail
From: tmcd@crl.com (Timothy A. McDaniel)
Newsgroups: comp.std.c
Subject: Re: Initializing a variable in terms of itself
Date: 6 Apr 1996 16:18:46 GMT
Organization: Tim McDaniel's home IBM-PC clone running Linux
Message-ID: <4k65h6$dfe@nntp.crl.com>
References: <4jpj9l$ik9@cnn.Princeton.EDU> <KANZE.96Apr2171323@slsvgqt.lts.sel.alcatel.de>
Reply-To: tmcd@crl.com
NNTP-Posting-Host: crl11.crl.com
X-Newsreader: perl5newspkg