This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Add a new type attribute always_alias (PR79671)


On Mon, Apr 10, 2017 at 8:50 AM, Richard Biener <rguenther@suse.de> wrote:
> So here's my variant of a fix.  I constrained the new flag
> TYPE_TYPELESS_STORAGE to arrays and thus hope my localized fix in
> build_cplus_array_type will suffice (if I have time I'll play with
> template instantiation).

Looks good.  I would expect this to just work with templates, but it
should of course be tested.  In particular, std::aligned_storage needs
to work.

>         * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
>         for arrays of unsigned char or std::byte.

I think it would be good to have a flag to select whether these
semantics apply to any char variant and std::byte, only unsigned char
and std::byte, or only std::byte.

Jason


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