Uoti Urpala <[email protected]> writes: > On Wed, 2012-07-25 at 10:53 +0100, Måns Rullgård wrote: >> "Ronald S. Bultje" <[email protected]> writes: >> > On Tue, Jul 24, 2012 at 7:45 PM, Loren Merritt <[email protected]> >> > wrote: >> >> - long x, y; >> >> - uint32_t pixel; >> >> + uint32_t tmp; >> >> >> >> - for (y = 0; y < h; y++) { >> >> - for (x = 0; x < w; x++) { >> >> - pixel = lowpass(frame_ant[x]<<8, src[x]<<16, temporal); >> >> - frame_ant[x] = ((pixel+0x1000007F)>>8); >> >> - dst[x]= ((pixel+0x10007FFF)>>16); >> >> + for (long y = 0; y < h; y++) { >> >> + for (long x = 0; x < w; x++) { >> > >> > Unfortunately, this won't compile on MSVC, please do declare the >> > variables outside the loop. >> >> Same goes for a number of other compilers. It's unfortunate, but a >> small price to pay for portability. > > What compilers are those actually? Since this syntax has been used > without problems they can't be very common ones.
Ronald already mentioned MSVC. TI's compilers for their DSPs also have this limitation. > Calling restrictions on basic language syntax "a small price" is > disingenuous IMO. That depends on the restriction. If someone suggested not using designated initialisers, I'd have them taken out and shot. > This kind of syntax issues could be automatically handled by a > conversion wrapper for the deficient compilers. Don't be ridiculous. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
