The C standard defines that two identifiers have same scope if and only if their scope terminates at the same point. And goes on further to state that:
Structure, union, and enumeration tags have scope that begins just after the appearance of the tag in a type specifier that declares the tag. Each enumeration constant has scope that begins just after the appearance of its defining enumerator in an enumerator list. Any other identifier has scope that begins just after the completion of its declarator.
Does it mean that two identifiers are formally called to have same scope even if the beginning of their scope doesn’t match ?
Yes, that’s a reasonable way of thinking about it. Otherwise no two identifiers would have the same scope!
In the above, the scopes of
aandbbegin at different points, but surely we want to think of them as being in the same scope!