C-family: Look through non-user-facing typedef
The compiler now correctly identifies user-facing types even when going through non-user-facing typedefs.
The compiler’s ‘aka’ printing (used to display type information) could differ between in-tree and installed compilers, due to differences in how libstdc++ headers are treated. The issue was that the compiler would stop looking for the underlying user type when it encountered a non-user-facing typedef (e.g., __iter_type<T>). This commit fixes this by making the type resolution recurse through such typedefs.
In Details
The C family frontends (C, C++, Objective-C, Objective-C++) share a common infrastructure for type representation and manipulation. The function user_facing_original_type_p is used to determine whether a type is user-facing, which affects how it's displayed to the user. This commit modifies c-common.cc to recurse when encountering non-user-facing typedefs. Search terms: GCC c-family typedef user_facing_original_type_p.
For Context
In C and C++, typedef is used to create aliases for existing data types. The compiler needs to be able to resolve these aliases to determine the underlying type. This is especially important when displaying type information to the user, such as in error messages or debugging output. This commit ensures that the compiler can correctly resolve typedefs, even when they are nested or involve internal compiler types. Search terms: GCC c-family typedef user_facing_original_type_p.