Re: Stupid mwcc compilers ...

Jeff Hostetler (jeff@abisource.com)
Wed, 09 Jun 1999 09:28:44 -0500


i've logged this as bug #459 to add a section
to the developer guidelines document.

thanks
jeff

At 08:37 AM 6/9/99 -0400, Thomas Fletcher wrote:
>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.