[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ksh file name completion oddity / ksh cleanup question



On Tue, 14 Dec 2004, Matthias Kilian wrote:

> Here are the bizarre effects on the generated binaries:
> 
> misc.[co]: there is a difference in the generated code in
> blocking_read(). Changing
> 
> 	if (!tried_reset && errno == EAGAIN) {
> 
> into
> 
> 	if (!tried_reset && (errno == EAGAIN || errno == EGAIN)) {
> 
> seems "fix" this. Looks like some strange shortcoming in gcc's
> optimizer.

No, that's not the case. errno is a #define which resolves to a function 
call. In general, external fucntion calls should not be touched by an 
optimizer, since they might have side effects.

	-Otto



Visit your host, monkey.org