paul@UUNET.UU.NET (Paul Hudson) (02/06/89)
I believe (from my reading of an old ANSI draft) that the following is
legal.
typedef struct s { float x, y; } U;
static const U b[5];
void f(const U s);
main()
{
f(b[1]);
}
but gcc1.32 gives incompatible types in arg. passing. This program
typedef struct s { float x, y; } U;
static const U b;
void f(const U s);
main()
{
f(b);
}
compiles OK. What's going on? is it a bug?
Paul Hudson
Snail mail: Monotype ADG Email: ...!ukc!acorn!moncam!paul
Science Park, paul@moncam.co.uk
Milton Road, "Sun Microsysytems:
Cambridge, The Company is Arrogant (TM)"
CB4 4FQ