Re: Visual C++ support of C99 by using "C++ mode" (/TP)
- From: "Harald van Dijk" <truedfx@xxxxxxxxx>
- Date: 31 Mar 2007 04:20:49 -0700
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?
.
- Follow-Ups:
- Re: Visual C++ support of C99 by using "C++ mode" (/TP)
- From: albert . neu
- Re: Visual C++ support of C99 by using "C++ mode" (/TP)
- References:
- Visual C++ support of C99 by using "C++ mode" (/TP)
- From: albert . neu
- Visual C++ support of C99 by using "C++ mode" (/TP)
- Prev by Date: Visual C++ support of C99 by using "C++ mode" (/TP)
- Next by Date: C ethics question
- Previous by thread: Visual C++ support of C99 by using "C++ mode" (/TP)
- Next by thread: Re: Visual C++ support of C99 by using "C++ mode" (/TP)
- Index(es):
Relevant Pages
|