PDA

View Full Version : Microsoft C vs. non-evil C



sean
01-03-2002, 12:32 PM
Is there any difference in the actual CODE for microsoft C and the non-evil C most of us use?

P.S. Not a big fan of microsoft.

adrianxw
01-03-2002, 01:08 PM
Both C and C++ have ANSI standards. Most modern compilers are basically ANSI compliant, however, just about all of them have a few little deviations, and additions. In that respect, MS are like the others.

SilentStrike
01-03-2002, 02:25 PM
What makes Microsoft different is they believe that implementing the whole standard isn't that useful (god forbid large C++ applications would be easily portable to other compilers, and thus, other platforms).

"Microsoft’s goal is to have a ‘competitively compliant’ compiler – meaning it won’t be 100% compliant."

Or an anti-competitive compliant compiler, meaning anyone who knows C++ won't have trouble with the syntax, but

Here is an article in which Microsoft gives a sugar coated FU to compliance (or at least that's how I read it)

http://www.codeproject.com/interview/stanlippman14nov2001.asp

adrianxw
01-04-2002, 02:32 AM
>>>
What makes Microsoft different is they believe that implementing the whole standard isn't that useful (god forbid large C++ applications would be easily portable to other compilers, and thus, other platforms).
<<<

If this was a MS specific attitude, why do the other compiler suppliers not implement the standard?

Shiro
01-04-2002, 04:22 AM
>What makes Microsoft different is they believe that
>implementing the whole standard isn't that useful

Through the years I've seen many C-compilers and I must say that most compilers where not ANSI C compilers. Most of them had extensions to ANSI C some of them implemented just a subset of ANSI C.

So many compiler-developers seem to agree with Microsoft on that point.

Fool
01-04-2002, 10:37 AM
I always was told MS used a proprietary version of C. It wouldn't make sense to use the normal C like everyone else. If any of the source ever made it out the door it would be bad news for MS. Having a special version of C, it makes that much more difficult.

adrianxw
01-04-2002, 11:10 AM
In my experience, the differences between MS C and C++ and the ANSI standard are small, and mostly in slightly esoteric parts of the standard. The same can generally be said for the other compiler manufacturers.

In short, I do not believe there are any totally compliant solutions out there, (at least not yet), but that the differences there are, are unlikely to cause significant problems with porting, (at least from a language point of view).

SilentStrike
01-04-2002, 04:46 PM
Things as trivial as proper for loop scoping aren't implemented correctly with the Microsoft version of C++. That is not an esoteric feature of the langauge, and it caused me undue headaches trying to change compilers because I relied on the MS scoping.

adrianxw
01-05-2002, 11:00 AM
>>> loop scoping

I have never had a problem with this, simply because I consider relying on that to be bad style, so don't do it.

The only really irksome problem I have with VC++ is the way it returns NULL if "new" fails rather than throwing a bad_alloc exception as the standard says it should.

I've had equally irksome problems with C++ Builder, and the current C++ compiler on OpenVMS.