July 08, 2004
struct TestStructSizeof{
        int sizeof;
}

TestStructSizeof s;

s.sizeof will be 0.

Is this a intended feature or a bug?

July 11, 2004
i suppose it's supposed to be legal.. Walter implemented the .sizeof property as not to conflict with structs that had a .size member.. although you would think that declaring a member function as a keyword should be illegal!

though .sizeof isn't really a keyword, is it?  it's more of an implicit static member variable.  perhaps there should be code to prevent its being overridden..

"Thomas Kuehne" <eisvogel@users.sourceforge.net> wrote in message news:ccja6c$18af$1@digitaldaemon.com...
> struct TestStructSizeof{
>         int sizeof;
> }
>
> TestStructSizeof s;
>
> s.sizeof will be 0.
>
> Is this a intended feature or a bug?
>