On Wed, Jul 10, 2002 at 08:50:22PM -0400, Brian Hechinger wrote: > hello, > > anyway, it turned out to be a lot easier than i thought it was going to be. > edit config.h and define STDC_HEADERS, and then there is this interesting > other issue, which is why i'm writing here. > > MIPSpro does not honor the C++ thing where variable scope is kept withing a > for loop (for example) and so in the instance where the same variable name was > used twice in the same function within seperate scope, i had to change one to > be different so that MIPSpro could cope. > > would i be asking too terribly much to ask that the the variable scope rules > meet that of plain old C so that blackbox will cleanly build on SGI kit using > MIPSpro as the compiler? > > there were only, i think maybe 4 or 5 instances of this happening, so it's not > a terribly huge undertaking, and would help out tremendously thouse of us who > like to use MIPSpro. >
I used to work at a place where we build C++ on SGI machines, and the compiler needed a "-LANG:std" (or something very similiar) to accept "modern" C++ code. This flag set the compiler in a mode where code like ... for (int i = 0; i < 10; i++) { ... stuff ... } was good, and the "i" variable was only valid within the scope of the for block. Did you build blackbox with this flag? Art Haas -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin, Historical Review of Pennsylvania, 1759