[5046] in Athena Bugs

home help back first fref pref prev next nref lref last post

RTPC hc2.1y extern breaks struct

daemon@ATHENA.MIT.EDU (Mark W. Eichin)
Sun Jun 3 21:09:34 1990

Date: Sun, 3 Jun 90 21:09:21 -0400
From: Mark W. Eichin <eichin@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU

/* hmm... */
struct y1;
struct y2;

extern struct y1 v1[7];   /* NOTE: >>y1<< is important here, not v1 */

struct y1 {
  int x;
};

struct y2 {
  int x;
};

struct y1 v1[7];  /* this ends up undefined below */
struct y1 w1[7];  /* >>as does this<<, implying that the _type_, not the
		     variable, is broken */
struct y2 v2[7];  /* these two are fine. */
struct y2 w2[7];

/* the end */

/*
% cc -c dck..c ; nm -pog dck..o
dck..o:00000000 A .oVncs
dck..o:00000000 A .oVhc2.1y
dck..o:         U _v1
dck..o:         U _w1
dck..o:0000001c C _v2
dck..o:0000001c C _w2
*/


home help back first fref pref prev next nref lref last post