Stupid mwcc compilers ...

Thomas Fletcher (thomasf@qnx.com)
Wed, 9 Jun 1999 08:37:45 -0400


Just a little note here to people who are cranking
through the source making those all important
feature additions and bug fixes.

While this is perfectly legal C++:

for (int i=0; i<10; i++) {
printf("I is %d \n", i);
}
printf("I is now %d \n", i);

It unfortunately breaks the metrowerks c++ compiler
under BeOS since they bind (incorrectly) the scope
of int i to the for loop. As a courtesy to me and
those other people using BeOS ppc to build AbiWord,
please try and avoid this scoping problem and
instead do:

int i;
for (i=0; i<10; i++) {
printf("I is %d \n", i);
}
printf("I is now %d \n", i);

int the xp/library code. Thanks, I haven't run
across a lot of instances of this, but enough to
make me hate Metrowerks for such a stupid oversight/
incompatability.

Thanks,
Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 1.03b2.