default case

Arthur David Olson ado at elsie.UUCP
Tue Jan 2 07:26:36 AEST 1990


> The reason I want this is because it makes it possible for the
> compiler to notice when you misspell "default".

Script started on Mon Jan  1 15:25:00 1990
elsie$ cat try.c
int
main()
{
	switch (atoi("5")) {
		case 0:
			abort();
		defualt:
			break;
	}
	return 0;
}
elsie$ lint try.c
try.c:
try.c(7): warning: defualt unused in function main
elsie$ exit
script done on Mon Jan  1 15:25:16 1990
-- 
		1972:  Canada has no Saturn V equivalent
		1989:  Canada has no Saturn V equivalent
	Arthur David Olson   ado at alw.nih.gov   ADO is a trademark of Ampex.



More information about the Comp.lang.c mailing list