From 3277067434318388575
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10f5bc,6f6e97a6fdbbf44c
X-Google-Attributes: gid10f5bc,public
X-Google-Thread: 109fba,6f6e97a6fdbbf44c
X-Google-Attributes: gid109fba,public
X-Google-Thread: 1014db,6f6e97a6fdbbf44c
X-Google-Attributes: gid1014db,public
X-Google-Thread: 1149ec,6f6e97a6fdbbf44c
X-Google-Attributes: gid1149ec,public
X-Google-Thread: f78e5,6f6e97a6fdbbf44c
X-Google-Attributes: gidf78e5,public
X-Google-Thread: 102b75,6f6e97a6fdbbf44c
X-Google-Attributes: gid102b75,public
X-Google-Thread: 110292,6f6e97a6fdbbf44c
X-Google-Attributes: gid110292,public
From: collins@thor.tu.hac.com (Ron Collins)
Subject: Re: And you thought that the Pentium bug was bad!  (Get a load of this!)
Date: 1995/06/19
Message-ID: <3s4h92$hpf@hacgate2.hac.com>#1/1
X-Deja-AN: 104726336
distribution: world
references: <3s2las$1br@hustle.rahul.net>
followup-to: comp.std.c,comp.std.c++,comp.lang.c,comp.lang.c++,comp.sys.intel,comp.arch,comp.software.testing
organization: Advanced Depot Systems
newsgroups: comp.std.c,comp.std.c++,comp.lang.c,comp.lang.c++,comp.sys.intel,comp.arch,comp.software.testing

Ronald F. Guilmette (rfg@rahul.net) wrote:

[snipped out his personal history]


: -------------------------------------------------------------------------
: double d = 0.9;
:  
: int
: main ()
: {
:     double d = 0.8;
:     {
:         extern double d;
:  
:         printf ("%f\n", d);
:         return 0;
:     }
: }
: -------------------------------------------------------------------------

: This program *should* print 0.900000, and with most compilers, it does.

Maybe I'm missing the point here... but it seems to me that the program
*should* print 0.8 -- since the "d" defined outside the block is initialized
to 0.8.  I don't have any books with me, but is "extern" *required* to
scope outside of the function? (I thought it just had to scope outside
the current block).



                        Ron Collins
                        
-----
The views expressed here are mine alone, and do not reflect any practice
or policy of the Hughes Aircraft Company.

Ron Collins
Hughes Aircraft Company
Advanced Depot Systems
bldg M20  m/s P20
Tucson, Az  85706
�----



