On Sat, 2007-04-28 at 15:26 +0100, Jon Grant wrote: > A wider query relating to these warnings is that since make 3.81 is > released now, could we change make to use const's instead of #define'd > values, and inline functions instead of #define macro expressions?
No... well, at least not inline. While I have made the decision to no longer support pre-ANSI, K&R-only compilers as of 3.82, I'm still requiring ANSI C89 clean code, and inline is not valid C89. Const integers are legal of course, but I don't know that they really add much clarity. > file.c: In function 'file_timestamp_cons': > file.c:765: warning: comparison of unsigned expression < 0 is always false > file.c:766: warning: comparison between signed and unsigned > file.c:766: warning: comparison of unsigned expression < 0 is always false > file.c:769: warning: comparison of unsigned expression < 0 is always false I haven't looked at these in a while, but the last time I looked this warning was actually an integral part of the implementation of these macros. In other words, if you fixed the warnings the macros wouldn't work as designed anymore. You might look in the ChangeLog. Paul Eggert provided these macros so we'd need to discuss any changes with him. > function.c: In function 'func_lastword': > function.c:696: warning: 'p' may be used uninitialized in this function Oops, that's a bug. Fixed. > function.c: In function 'func_shell': > function.c:1597: warning: variable 'error_prefix' might be clobbered by > 'longjmp' or 'vfork' > function.c:1589: warning: argument 'o' might be clobbered by 'longjmp' > or 'vfork' These have been around forever and I don't know how to fix them. If you do, please let me know. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make