[cc65] Struct union

From: Stefan <vorsichtphysiker1gmx.net>
Date: 2013-02-01 07:41:51
Is it normal, that this works??
There are many similarities between structs and unions, but there are also differences. So this shouldn't work, or am i wrong.

struct a 
{
	int x;
	int y;
};

union b
{
	int x;
	int y;
};

void main(void)
{
	struct a c = {100,200};
	union a d;
	struct b e;
	union b f;
}

struct a 
{
	int x;
	int y;
};

union b
{
	int x;
	int y;
};

> Executing: C:\Program Files (x86)\ConTEXT\ConExec.exe "cl65" -Oirs -tc64 -l struniontest.lst -m struniontest.map -Ln struniontest.lbl "struniontest.c" -o struniontest_c64.run

struniontest.c(19): Warning: `d' is defined but never used
struniontest.c(19): Warning: `e' is defined but never used
struniontest.c(19): Warning: `f' is defined but never used
> Execution finished.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Feb 1 07:42:04 2013

This archive was generated by hypermail 2.1.8 : 2013-02-01 07:42:08 CET