E
Emmanuel Delahaye
Hi,
I know that C90 and C9x (N869) doesn't allow to define an array of size 0.
int x[0]; /* constraint violation */
I was under the impression that this was possible in C99, due to the common
C90 practice:
struct a
{
int x;
char y[1];
};
that allows to build a linear structure with an array bigger than one,
struct a
{
int x;
char y[0];
};
char x[123];
struct a *p = (struct a*) x;
or is it just an extension of gcc?
Thanks to clarify my close-to-melt brain.
(we have 40°C in Paris, hopefully, I go to Ireland for holydays next Sunday)
I know that C90 and C9x (N869) doesn't allow to define an array of size 0.
int x[0]; /* constraint violation */
I was under the impression that this was possible in C99, due to the common
C90 practice:
struct a
{
int x;
char y[1];
};
that allows to build a linear structure with an array bigger than one,
struct a
{
int x;
char y[0];
};
char x[123];
struct a *p = (struct a*) x;
or is it just an extension of gcc?
Thanks to clarify my close-to-melt brain.
(we have 40°C in Paris, hopefully, I go to Ireland for holydays next Sunday)