From -2047388379123397049
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,17221ee87fa64d29
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1993-03-10 09:48:29 PST
Newsgroups: comp.std.c++
Path: sparky!uunet!titan!lpi!pkt
From: pkt@lpi.liant.com (Scott Turner)
Subject: Re: useless declarations
Message-ID: <1993Mar10.162803.25326@lpi.liant.com>
Sender: pkt@lpi (Scott Turner)
Organization: Liant Software Corporation
References: <1ng5q8INNeu0@darkstar.UCSC.EDU> <1993Mar9.135445.23786@lpi.liant.com> <1niq8fINNa45@darkstar.UCSC.EDU>
Date: Wed, 10 Mar 1993 16:28:03 GMT
Lines: 25

In article <1niq8fINNa45@darkstar.UCSC.EDU>, daniel@cse.ucsc.edu (Daniel R. Edelson) writes:
> >> 	struct outer {
> >> 		struct {
> >> 		    static int y;
> >> 		};
> >> 	};
> 
> >This example is not legal because it's impossible to satisfy the 
> >requirement of defining the static member y.
> 
> Ok. However, syntactically this is legal (enough)
> for this translation unit to compile to an object module?

Yes.

The natural time to detect the failure to define a static member of an
externally linked class is during linking.  In this case the impossibility
of defining the static member could be reported as an error during compilation
of this translation unit.  No supplementary translation unit can be written
which would define y, and thereby rescue this current translation unit.
--
Prescott K. Turner, Jr.
Liant Software Corp. (developers of LPI languages)
959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com


