wondek

I've noticed that visual c++ 2005 beta (and previous versions) doesn't fully support the new ansi c standard, for example there's no stdbool.h or tgmath.h In my new compiler should include new standards for compatibility reasons. Will new standard be included in future releases

Re: Visual C++ Language ANSI C ISO/IEC 9899:1999

Ismail Pazarbasi

AFAIK, VC doesn't support C99, but C98.

Ismail




Re: Visual C++ Language ANSI C ISO/IEC 9899:1999

Jonathan Caves MSFT

I presume by C-98 you mean ISO/IEC 14882:2003(E) - this is a Standard for C++ not for C. Also this Standard is obsolete, it has been replaced by ISO/IEC 14882:2003(E) which is an updated C++ Standard that was release in 2003.

We are adding support for the new features in the C Standard, ISO/IEC 9899:1999 (E), for example for Visual C++ 2005 we added support for "long long" and for variable argument macros. But we are picking the features that are requested by our users and that will also work well with C++.

We are also working very closely with SC-22/WG-14 (the C Language Committee) on TR 24731. This Technical Report will be an addendum to the ISO/IEC 9899:1999 (E) and it provides a specification for safer, more secure C library functions. For example: it specifies strcpy_s which is a safe version of strcpy. Visual C++ 2005 ships with an implementation of this Technical Report.

If you have a favorite C-99 feature that you'd like us to support then let me know and I'll add it to our list of requests. But note: the Visual C++ team has both limited time and resources and so just because a specific feature is on our wish-list it doesn't mean that we'll find the time to implement it.




Re: Visual C++ Language ANSI C ISO/IEC 9899:1999

Don Perkins

Sorry to bump up an old thread, but I am also looking for the implementation of "modern" C features, since I use C in a teaching environment.

I think ismail had a transposition error there and intended to refer to the earlier C89 standard (ISO/IEC 9899:1989), which does appear to be fully supported in Visual Studio 2005.

The highest item on my wish-list for C99 compatability (and a feature that is fully simpatico with C++) is on-the-fly declaration (aka: Just In Time Declaration) of variables. VS 2005 currently requires that all variables within a scope be declared before any non-declarative statements with that scope. This means that a valid C99 block like this:

{
printf("Hi mom.\n");

unsigned a = 90;
for (unsigned count = 0; count < 30; ++count)
printf("%i\n", a-- * count);
}

has to be re-written in Visual Studio 2005 as:

{
unsigned a = 90, count = 0;

printf("Hi mom.\n");

for (; count<30; ++count)
printf("%i\n", a-- * count);
}

Since I'm teaching to the current standard, I often have to remind my students that they will need to reorganize their code to be compliant with the C89 standard when doing work in the lab. (Plus, since I'm a C++ programmer in my day gig, it's second nature to write code using JIT-declarations.)

Is this feature currently on the wish list