This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH updated] Use a proper C tokenizer to implement the obsolete typedefs test.


On Wed, Feb 20, 2019 at 12:29 PM Joseph Myers <joseph@codesourcery.com> wrote:
> On Wed, 20 Feb 2019, Florian Weimer wrote:
>
> > * Zack Weinberg:
> >
> > >         * sys/types.h (__u_intN_t): Remove.
> > >         (u_int8_t): Typedef using __uint8_t.
> > >         (u_int16_t): Typedef using __uint16_t.
> > >         (u_int32_t): Typedef using __uint32_t.
> > >         (u_int64_t): Typedef using __uint64_t.
> >
> > Why doesn't this change C++ name mangling?
>
> Because the logic in c_common_type_for_mode prefers unsigned int over long
> unsigned int, and long unsigned int over long long unsigned int, if they
> have the same mode. which matches the logic used in bits/types.h.  (Also,
> the mangling of those types is verified in c++-types.data so the testsuite
> would show if it changed.)

Also also, bits/stdint-uintn.h uses __uintN_t to define uintN_t, and
u_intN_t and uintN_t were formerly used interchangeably throughout
inet/ (before I cleaned all of that up), so if there was a mismatch we
would have been getting incompatible type errors all over the place.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]