I believe that this is a new philosophy that is getting more and more common: issue as many warnings as possible, specially when portability is compromised.
I don't like it too, but whenever I will have to port something to 64 bits, it surely will help... Alain Blair Campbell escreveu: > IMHO, it should only cause a warning for the 32-bit case, and the > difference should be ingored in 16-bit, because they are the same > size. Note that in 32-bit DJGPP, long can go to int without any > warnings, even with -Wall. > > On Thu, Feb 26, 2009 at 3:55 PM, Alain M. <ala...@pobox.com> wrote: >> Christian Masloch escreveu: >>>>> You can cast a short to an int, an the conversion in ok, but to cast a >>>>> short* to an int* will bring in 2 extra bytes and an INVALID POINTER... >>>> no short * and int * are the exact same size in 16-bit compilers (try >>>> compiling a test program which prints sizeof(int), sizeof(short). For >>>> some reason openwatcom thinks it's an error. >>> I don't know why "unsigned short" to "unsigned int" should be an error if >>> they're the same size (probably so code doesn't get unportable due to >>> this?), but the new OW 1.8 had changes regarding both _dos_allocmem and >>> _dos_getftime. These either caused the warnings or they solved them (if >>> they occured in 1.7) but I think the former: >> Ok, I allways use OW for 32 bit programs... for 16 bit it is ok, but at >> least not recomended. >> >> Using the link in the other message I found this, which plainly explains >> how this problem came around: >> >> * The segment argument used with _dos_allocmem(), _dos_freemem() >> and _dos_setblock() is now unsigned int instead of unsigned short. This >> change was made for compatibility with other compilers. >> >> A fix for this would requide conditionals based no the compiler >> version... really not nice at all :( >> >> Alain ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel