I
Ioannis Vranos
In C99 it is mentioned:
"The sizeof operator yields the size (in bytes) of its operand, which
may be an expression or the parenthesized name of a type.".
If I am not wrong, this implies that
int x;
size_t y= sizeof(x);
is not valid.
and only the following is valid:
int x;
size_t y= sizeof x;
However I am puzzled, and thought the first was also valid in
C90/C95(/C++03).
"The sizeof operator yields the size (in bytes) of its operand, which
may be an expression or the parenthesized name of a type.".
If I am not wrong, this implies that
int x;
size_t y= sizeof(x);
is not valid.
and only the following is valid:
int x;
size_t y= sizeof x;
However I am puzzled, and thought the first was also valid in
C90/C95(/C++03).