Article View: comp.std.c
Article #6241Re: Simple questions about array declarations
From: Bruce Blodgett
Date: Tue, 27 Feb 1990 16:38
Date: Tue, 27 Feb 1990 16:38
21 lines
1217 bytes
1217 bytes
In article <12235@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) replies:
>- static int array7[];
>- static int array7[3] = { 1,2,3 };
>- static int array8[3];
>- static int array8[3] = { 1,2,3 };
>- static int array9[3];
>- static int array9[] = { 1,2,3 };
>- static int array10[];
>- static int array10[] = { 1,2,3 };
>
>All these are okay.
According to X3.159-1989 (the C Standard) section 3.7.2, "If the
declaration of an identifier for an object is a tentative definition
and has internal linkage, the declared type shall not be an incomplete
type." The first declarations of array7 and array10 are tentative,
have internal linkage, and are incomplete. Therefore they are not
allowed.
Bruce Blodgett
Technical Details
Message-ID:
<1990Feb27.163852.4094@granite.cr.bull.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!bbn!granite!blodgettReferences:
<25E833AA.15362@paris.ics.uci.edu> <12235@smoke.BRL.MIL>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!bbn!granite!blodgett From: blodgett@granite.cr.bull.com (Bruce Blodgett) Newsgroups: comp.std.c Subject: Re: Simple questions about array declarations Message-ID: <1990Feb27.163852.4094@granite.cr.bull.com> Date: 27 Feb 90 16:38:52 GMT References: <25E833AA.15362@paris.ics.uci.edu> <12235@smoke.BRL.MIL> Organization: Bull HN Information Systems Inc. Lines: 21 In-reply-to: gwyn@smoke.BRL.MIL's message of 26 Feb 90 19:17:59 GMT