Re: Visual C++ support of C99 by using "C++ mode" (/TP)



albert.neu@xxxxxxxxx wrote:
The following is valid C99 code:

/************* c_test.c ***************/
#include <stdio.h>
#include <stdbool.h>
#include <limits.h>

int main( void )
{
bool b = true;
if (b)
printf("hello world\n");

char c = 5;
printf("%hhd\n", c);

int size = INT_MAX / 10000;
printf("%d\n", size);
char a[size];
a[0] = 'a';
a[1] = 'b';
a[2] = '\0';
printf("%s\n", (char *)&a);

return 0;
}


The above C99 code can be compiled on VC++, by just commenting the 2nd
line (see below!)

In other words, by making it valid C++ and invalid C99.

What's your point?

.



Relevant Pages

  • Re: Dont want Intermediate language
    ... Express will certainly compile it. ... BOOL CALLBACK WndProc; ... void ShowError; ... bool create_sfx(const char* file, const char *toFile) ...
    (microsoft.public.vc.language)
  • Launching a process with specified credentials failed
    ... BOOL createProcessAsUser; ... void ReadToEnd; ... BOOL ret = FALSE; ... char buf; ...
    (microsoft.public.platformsdk.security)
  • Re: fgets not doing as I expect.
    ... char otherlocation; ... bool onorder; ... void getstr(char *str, int l); ... void browseparts{ ...
    (comp.lang.c)
  • Re: Linker Error
    ... Class Utility{ ... bool Utility::ReplaceStringBetweenKey{ ... void MyConfigure::Write ... char* s; ...
    (microsoft.public.vc.language)
  • [PATCH 2.6.19-rc1 V9] drivers: add LCD support
    ... Adds support for the ks0108 LCD Controller as a device driver. ... +The buffer should be a 128*64 unsigned char array: ... * GNU General Public License for more details. ... +static void cfag12864b_setbit ...
    (Linux-Kernel)