|
That has been the case for a long time. If you disable MS extensions, that shouldn't happen anymore.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Templates are the first thing that comes to mind, partial template specialisation for one. There is a VERY cool book called Modern C++ Design that I am salivating over getting, but there is no point - the examples do not compile under VC++.
As for a list, try reading WDJ, they have a new bug or two every month that they bring to M$ attention. Usually it's not documented by them, and usually they say 'we knew about this, it will be fixed in a later release'.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
It's not the existing code, but the future code base, that really concerns me most. With the heavy weight on .NET development from MS, we'll start to see more and more code using non-Standard C++ keywords (such as __gc, __sealed, __property, __event etc.) in our future VC++ projects. Picture your code base in about 5 years from now, filled with all these keywords and suddenly your boss asks you to port it to another platform. I wish you a very good luck.
So it's nice to see Microsoft's attempt to make native C++ compiler more Standard compliant, but I'm afraid, the .NET and hence managed C++ initiative will work against the progress made in the former case.
Oh yes, as some .NET zealot may put it, it's a natural and modern evolution of C++ language. Don't you think so?
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
I am not arguing that the compiler shouldn't be compliant. But I have to wonder what people expect that compliance is going to buy them.
Sure, the new language features would be nice. But hell, I like a lot of the MS extensions. And a few cases when MS didn't go with the standard such as variable scope in for loops.
It won't produce a common set of sources for things like STL. There will still be tons of #ifdefs to overcome differences in compilers. For every standard statement, there are 5 things a compiler can do that is either undefined, unspecified, or unpredictable.
a [i] = i++;
(If I am remembering the example right) Depending on your compiler, that will execute differently. The standard doesn't specify when the actual post increment has to happen as long as it happens prior to the next statement.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I believe you mean a[i++] = i, because the standard only says the variable is incremented after the value is used, not if it's after the line has been executed.
But this is a good example of code that people should not be writing, for exactly that reason - it's behaviour is undefined and therefore even your current compiler would be within it's rights to change that behaviour between releases.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
That it's. When you install MSVC its default setting for warning level is 3 and all extentions is turned on. I have impression that majority of programmers just use these settings without worrying about compliance. "Why to bother? We'll stick with MS until end of times..". I saw a lot of code that simple switch from warning level 3 to 4 was exposing many bugs thanks to "innocent" warnings about varaibles used without initialization, unreferenced parameters etc..
Even with current compiler's compliance big amount of code could be significally improved.
Unfortunately, many CRT/STL/SDK headers produce level 4 warning while being compiled. Among them are "nonstandard extension used" warnings, too. So, I guess, coders are always stand against temptation to ignore many warnings and incompliances in order to get "clean" Output window in MSVC.
|
|
|
|
|
One has to wonder how many lines of VB people will be changing to compile under VB.Net. In the case of C++ there is a publically available standard and I think anyone who deviates enough from that for compilation on a standards compliant compiler to not work is being hoist by their own petard. This is *not* a good reason for compiler manufacturers to skimp on the sort of sexy features of the language that VC currently lacks.
Anyone who says they are unwilling to change their code to compile under a standards compliant compiler is scared of their own mistakes and should go use VB instead. If EVERY change I had to make was a result of my writing incorrect C++ code, then I would accept it as a learning experience. I have in the past found that I've done things in a less than optimal way at work, and I've gone through my code in my own time to change it to something better/safer/more correct. Surely we all feel the same way ? The idea is to keep learning and improving ourselves, not sitting on our thumbs and thinking we know it all. I sure as hell don't.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Well said. Until C++ standard compliant, the C# standardization politics is laughable
There is no excuse for non-stardard C++ compiler, especially when extensions are being added without notice!
The main problem with standard compliant compiler is MS own source codes, not ours and there is no reason to let it look like we will have problems.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Christian Graus wrote:
If EVERY change I had to make was a result of my writing incorrect C++ code, then I would accept it as a learning experience. I have in the past found that I've done things in a less than optimal way at work, and I've gone through my code in my own time to change it to something better/safer/more correct. Surely we all feel the same way ? The idea is to keep learning and improving ourselves, not sitting on our thumbs and thinking we know it all. I sure as hell don't.
Well said, Christian.
CodeGuy
The WTL newsgroup: now 1060 members! Be a part of it. http://groups.yahoo.com/group/wtl
|
|
|
|
|