Subject: Re: Warnings in nfsv3 code--buggy gcc?
To: Per Fogelstrom <>
From: James Michael Chacon <>
List: tech-kern
Date: 03/31/1996 00:28:08
>> int foo()
>> {
>> 	u_quad_t	off;
>> 	if (xxx) {
>> 		do stuff
>> 		off = something;
>> 		use off
>> 	}
>> loop1:
>> 	off = something;
>> 	use off
>> }
>> Note that 'off' is u_quad_t in all cases.
>Hmm.. tried your example on 2.7.2 (mips) without any complaints (-Wall).
>But the above exapmple is maybe not represenative for the real code.

Compile the code with -O and try again. Gcc doesn't do flow analysis until 
some form of optimization gets turned on. This is also very annoying since in
general I develope code with -g and then turn on optimization after I'm
fairly certain of base functionality working. To suddenly have error free
and warning free code start generating spurious warnings only with -O seems
a bit ridiculous.