Python + Borland - msvcrt = grr.

Neil Hodgson nhodgson at bigpond.net.au
Mon Apr 23 04:35:52 EDT 2001


Stephen:

>     #1) BCC is giving off the STRANGEST warnings. They make no
sense-at-all,
> it seems to me that the compiler doesn't comprehend that a variable that
> only gets modified by macros is actually being modified, so it complains a
> LOT about 'variable is assigned a value but never used' etc. Anyways, I'm
> looking to the C++Builder for a fix on this :)

   BCC tries hard to find never used value settings, including some that
other compilers don't warn about. For example, IIRC, this generates a
warning because the 1 is never read:
   int i = 1;
   if (c)
      i = 2;
   else
      i = 3;
   As does the same thing in a switch statement. BCC may also sometimes work
out when loops will never be run or be run only once. I can't recall all the
cases but BCC has always been accurate when its given me this warning.

   Neil






More information about the Python-list mailing list