The following code causes a User-Exec 3 panic when the User::Leave call is executed. I believe this only happens under GCCE, as the same code under RVCT or emulator doesn't suffer from the same problem.

Code:
void fooL(int bob, ...)
	{
	VA_LIST argp;
	VA_START(argp,bob);
	User::Leave(KErrNotFound);
	VA_END(argp);
	}

...
	TInt myerr;
	TRAP(myerr,fooL(5,6,"Smells"));
in fact, the code can be as as simple as:

Code:
void fooL(int bob, ...)
	{
	User::Leave(KErrNotFound);
	}

...
	TInt myerr;
	TRAP(myerr,fooL(5));
but this works:

Code:
void fooL(int bob)
	{
	User::Leave(KErrNotFound);
	}

...
	TInt myerr;
	TRAP(myerr,fooL(5));
Anyone come across this? Found a way round it, short of trapping every leave in all variable argument functions? Is it a bug in GCCE?