On Mon, 17 Jun 2024 at 07:02, Richard Biener via Gcc <gcc@gcc.gnu.org> wrote:
>
> On Sun, 16 Jun 2024, Martin Uecker wrote:
>
> >
> >
> > I am trying to understand what check_qualified_type
> > does exactly. The direct comparison of TYPE_NAMES seems incorrect
> > for C and its use is c_update_type_canonical then causes
> > PR114930 and PR115502.  In the later function I think
> > it is not really needed and I guess one could simply remove
> > it, but I wonder if it works incorrectly in other cases
> > too?
>
> TYPE_NAMES is compared because IIRC typedefs are recorded as variants
> and 'const T' isn't the same as 'const int' with typedef int T.

Presumably it's also relevant for this example:

typedef signed int sint;

struct S {
  int i : 2;
  sint s : 2;
};

Here it's impl-defined whether i is signed, but s must be signed.

Reply via email to