Start Prepping Your Code
-
Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64 onwards and upwards...
-
Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64 onwards and upwards...
:sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John
-
:sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John
Yes, I still use VC6 mostly because there is no compelling reason for me to move to VC.Net. The IDE is much more bloated and sluggish, and I develop mostly server-side stuff now, so the forms designers are of no value. I still use a 650Mhz PIII Celeron laptop, running SQL Server, IIS and my web apps. I figure if it performs well on my laptop, there should be no problems when I upload the code to the production farm of gear that is very high end. However, we do maintain and support our Web C++ App server product for VC.NET targets as well, so I do need to keep up on these changes. onwards and upwards...
-
:sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John
We are barely starting our port now to a .Net environment. We are stuck on VC6 because a major core 3rd party library was based on the STL of VC6 and is incompatible with .Net. We've had to decide on and replace that library to start moving forward. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64 onwards and upwards...
Stuck on VC6 because older libraries just work with that version. We will have to pay some cold hard cash to get a supported version recent enough to work on the newer stuff. If it were only for my own code, I could live with the sluggishness of the newer IDE, or at least beg for a PC upgrade. I still hope for upgraded libraries and compiler, whenever it makes sense.
-
Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64 onwards and upwards...
1. You can use /Zc:forScope- or #pragma conform(forScope, off) to turn this feature off. 2. You can define
_USE_32BIT_TIME_T
to use a 32-bittime_t
. Both pieces of information based on the documentation currently on Visual Studio 2005 Developer Centre[^]. Stability. What an interesting concept. -- Chris Maunder -
Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64 onwards and upwards...
Prepping is only required for people who didn't write proper C++ in the first place. Knowing that VC6 was not standards compliant, I always wrote loops like this: int i = 0; for (; i < 100; ++i) so that my code would compile on VC, and on a standards compliant compiler. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
:sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John
Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
We are barely starting our port now to a .Net environment. We are stuck on VC6 because a major core 3rd party library was based on the STL of VC6 and is incompatible with .Net. We've had to decide on and replace that library to start moving forward. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
If your third party library NEEDED the broken STL that came with VC6, you're better off without it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
Prepping is only required for people who didn't write proper C++ in the first place. Knowing that VC6 was not standards compliant, I always wrote loops like this: int i = 0; for (; i < 100; ++i) so that my code would compile on VC, and on a standards compliant compiler. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
It's not that it isn't compliant to write:
for( int i = 0; i < j; i++ ) {
statement
}It's that the scope of i only extends (according to the ARM r.6.5.3) to the end of the for statement. Most people have coded such that they continue to use i after the for block, at which point it should be out of scope. This is where they are going to have trouble. ...cmk Save the whales - collect the whole set
-
Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Most of the porting issues I've seen have been down to either code that hasn't been scanned for warnings thoroughly (a strict Lint warning policy can help here, but many shops seem to not even progress to warning level 4) or to problems arising from changed behaviour in frameworks. One company I know has a big issue with the runtime class/dynamic object creation behaviour in MFC 7 (sufficient to have an open incident with MS on the subject) but such issues are generally the last ones found - and the most intractable. At the end of the day porting and validating a 1 million line project is no fun whichever way you look at it. :~ Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
It's not that it isn't compliant to write:
for( int i = 0; i < j; i++ ) {
statement
}It's that the scope of i only extends (according to the ARM r.6.5.3) to the end of the for statement. Most people have coded such that they continue to use i after the for block, at which point it should be out of scope. This is where they are going to have trouble. ...cmk Save the whales - collect the whole set
yeah, so.... if you write it my way, it's both compliant, and will work AS EXPECTED in VC6. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Most of the problems I have had was not with my code but with code I have used from codeproject and other places (codeguru being one of them). There is at least 75K lines of this code in use in my applications and after two weeks of trying port this code I gave up. This was about two years ago and at the time none of the articles were updated to support VC7. Maybe by now enough of them are fixed that the problem will not be as time consuming the only thing is that I have no time to spend on this for the next 3 months... John
-
If your third party library NEEDED the broken STL that came with VC6, you're better off without it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Oh believe me!! I have no regrets in dropping it. It's just troublesome porting to a new one, but we will gain OS portibility and license free development in the new move. :) _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)