Robin Barker <Robin.Barker@npl.co.uk> writes: >Nick > >Something needs to change Apparently! >-- at the moment >nostdio.h defines 'printf' as 'CANNOT _printf_', so >'format(printf,1,2)' becomes 'format(CANNOT _printf_,1,2)' >which does not parse. (You only get this with -DCHECK_FORMAT.) For some meaning of "at the moment". I am reasonably sure we fixed the #define of printf in bleadperl (post 5.8.0) It does not only mess up attributes but also preculdes using printf() in XS code in general - in the brave new PerlIO world that is allowed. In older perls the ordering of the #include-s via perl.h is supposed to be cleverly (diabolically?) contrived so that the attributes worked. I know that when that printf mess went in the equivalent of -DCHECK_FORMAT was the default (at least for gcc I habitually used). I guess that now CHECK_FORMAT is optional (because of all the %_ stuff makes it noisy) - patches may have broken the clever ordering and we only just noticed. > >Using '__printf__' seemed the neated way to fix this. But suppose (as seems to be the case) HP/UX compiler supports format(printf,...) but does NOT support format(__printf__,...)? Do we want to stop HP/UXers do -DCHECK_FORMAT? The easiest way is #undef printf the best way is loose the #define. -- Nick Ing-Simmons http://www.ni-s.u-net.com/