2008/6/17 Eric Blake: > Marko Lindqvist <cazfi74 <at> gmail.com> writes: >> >> A couple of c.m4 macros declare function with return type char, and >> then return same return value from main(). Attached patch translates >> character from function into int 0 or 1 to be returned from main(). > > Which compiler, and what warning does it output?
I wrote the original patch a couple of months ago and can't really remember exact error message. Now I fail to reproduce it with any build setup I have :-( Compiler was certainly gcc (maybe cross-compiler) I'll produce some tool-chains with older versions and see if I can reproduce the warning message then. > Since this appears to be only > link tests (ie. we don't care about the actual return value, only that the > compiler doesn't optimize out the function call), would the simpler: > > return !func(); > > also squash the warning? That was actually first version I used, but having such limited knowledge about autoconf I decided to change it to produce return value 'the right way' just in case. - ML