🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2405

Structure tags

#2405
From: Tsutomu Itoh
Date: Thu, 07 Feb 1991 03:21
38 lines
1279 bytes
Could someone please clarify the correct implementation of structure
tags and incomplete types as in the following fragments, assume there
are no other declarations of struct foo in scope:-

1a.

struct foo {int i;};
struct foo;
struct foo bar;

1b.
struct foo;
struct foo {int i;};
struct foo bar;

Should the compiler object to 1a but not to 1b as implied in 3.5.2.3?
If so it seems many compilers allow both.

2a
int bar(struct foo);
struct foo {int i;};

2b
struct foo;
int bar(struct foo);
struct foo {int i;};

Is the empty structure declaration necessary?

If you mail any replies please cc to paul@tetrauk.uucp

Thanks
--
Paul Ashton
-- 

$BIY;NDL3t<02q<R!!>BDE9)>l!!%*!<%W%s%7%93+!KBh0l3+H/ItBhFs3+H/2](J
$B0KF#!!6P!!!!(Jt-itoh@nm.fujitsu.co.jp 
Technical Details
Message-ID: <4736@utsm.nm.fujitsu.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!kddlab!titcca!wnoc-tyo-news!ascwide!ascgw!fgw2!fgw!utsm!t-itoh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!kddlab!titcca!wnoc-tyo-news!ascwide!ascgw!fgw2!fgw!utsm!t-itoh
From: t-itoh@utsm.nm.fujitsu.co.jp (Tsutomu Itoh)
Newsgroups: comp.std.c
Subject: Structure tags
Message-ID: <4736@utsm.nm.fujitsu.co.jp>
Date: 7 Feb 91 03:21:42 GMT
Reply-To: t-itoh@utsm.nm.fujitsu.co.jp (Tsutomu Itoh)
Organization: Numazu factory, Fujitsu Limited.
Lines: 38