Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: A less important oddity

37 views
Skip to first unread message

Kalle Olavi Niemitalo

unread,
Sep 25, 2015, 6:21:40 PM9/25/15
to
r...@zedat.fu-berlin.de (Stefan Ram) writes:

> [Quoted text removed due to X-No-Archive]

In C, you can write

void fn(void)
{
struct same { int same; };
struct same same;
same.same = 0;
}

and there is no ambiguity; same means the variable,
struct same means the type, and same.same means the
data member. I suppose C++ tries to be compatible
with C header files that define such structures,
and therefore cannot forbid them outright.
0 new messages