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 04/05/2017 03:02 PM, Bernd Edlinger wrote:
On 04/05/17 19:22, Bernd Edlinger wrote:
On 04/05/17 18:08, Jakub Jelinek wrote:

Yes, exactly.  I really want to reach the deadline for gcc-7.
Fixing the name is certainly the most important first step,
and if everybody agrees on "typeless_storage", for the name
I can start with adjusting the name, and look into how
to use a spare type-flag that should be a mechanical change.


Jakub, I just renamed the attribute and reworked the patch
as you suggested, reg-testing is not yet completed, but
it looks good so far.  I also added a few more tests.

I have changed the documentation as Richi suggested, but
I am not too sure what to say here.


Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi	(revision 246678)
+++ gcc/doc/extend.texi	(working copy)
@@ -6656,6 +6656,11 @@ declaration, the above program would abort when co
 @option{-fstrict-aliasing}, which is on by default at @option{-O2} or
 above.

+@item typeless_storage
+@cindex @code{typeless_storage} type attribute
+An object declared with a type with this attribute behaves like a
+character type with respect to aliasing semantics.
+
 @item packed
 @cindex @code{packed} type attribute
 This attribute, attached to @code{struct} or @code{union} type


"An object .... behaves like a character type"? I think you mean "as if it had character type". Or maybe something simpler like "A type declared with this attribute has the same aliasing semantics as @code{char} type."

-Sandra


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