Path: utzoo!attcan!uunet!samsung!think!mintaka!mit-eddie!bu.edu!mirror!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: Simple questions about array declarations Message-ID: <16063@haddock.ima.isc.com> Date: 1 Mar 90 16:05:35 GMT References: <25E833AA.15362@paris.ics.uci.edu> <12235@smoke.BRL.MIL> <16045@haddock.ima.isc.com> <12248@smoke.BRL.MIL> <1990Feb28.221846.25750@granite.cr.bull.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 12 In article <1990Feb28.221846.25750@granite.cr.bull.com> blodgett@granite.cr.bull.com (Bruce Blodgett) writes: >To determine the reason that the declaration > static int array7[]; >is not allowed, ask yourself, "if this is the only declaration of >array7, how many elements should the array have?" The answer, of >course, is that you can't tell. That is why this is not allowed. So why doesn't the language wait to see if it *is* the only declaration before rejecting it? In other words, why isn't that a legal non-defining forward declaration? Note that "int foo[];" is legal, though it has the same problem. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint