Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ncar!oddjob!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.lang.c
Subject: Re: when a core dump occurs ?
Message-ID: <12220@mimsy.UUCP>
Date: 29 Jun 88 04:49:32 GMT
References: <835@suvax0.shizuoka.JUNET> <1285@ddsw1.UUCP>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 26

In article <1285@ddsw1.UUCP> koala@ddsw1.UUCP (Karl Meiser) writes:
>Usually its errors that cant be checked by the compiler, such as missing
>or incorrect arguments, examples:
>
>main()
>{
>long x;
>
>printf("%s");   /*  Missing argument  */
>printf("%d",x);  /*  Should be descriptor for long,  %d is for ints  */
>}

Hm.  `Cannot be checked'?

	% lint -h tt.c
	tt.c:
	tt.c(5): warning: possible format/argument count mismatch
	tt.c(6): warning: printf: (int) format, (long) arg (arg 2)
	tt.c(6): warning: x may be used before set
	printf returns value which is always ignored
	%

(Somehow this reminds me of arguments about `volatile' detection :-) )
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris