In C code, I\'ve seen the following:
typedef struct SomeStructTag {
// struct members
} SomeStruct;
I\'m not clear on why this is any d
There is no reason within the C standard to use different names for tags and types. They cannot interfere with each other because they are in different name spaces and cannot be used in the same places.
Therefore, the only reason to use different names would be for human psychology. Although other answers have suggested that using different names for tags and types makes it easier to spot them in code, there is never any ambiguity because structure tag names only appear after struct, and only structure tag names appear after struct. More than that, if they are the same, you cannot accidentally use one where you intend the other. So there is no need to use different names.
The fact that C++ adopted structure tags as class names demonstrates it is unnecessary for there to be any difference.