public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3210] d: Use `int` to store class and struct flags
@ 2021-08-29 16:31 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-08-29 16:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2b8543a8ce5dd68b7f06d526d6aa42ad1d2060dc

commit r12-3210-g2b8543a8ce5dd68b7f06d526d6aa42ad1d2060dc
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sat Aug 28 20:28:02 2021 +0200

    d: Use `int` to store class and struct flags
    
    gcc/d/ChangeLog:
    
            * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoClassDeclaration *)):
            Use int to store type flags.
            (TypeInfoVisitor::visit(TypeInfoStructDeclaration *)): Likewise.

Diff:
---
 gcc/d/typeinfo.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc
index 978c73e65f6..04e228abf7c 100644
--- a/gcc/d/typeinfo.cc
+++ b/gcc/d/typeinfo.cc
@@ -868,7 +868,7 @@ public:
 	this->layout_field (inv);
 
 	/* ClassFlags m_flags;  */
-	ClassFlags::Type flags = ClassFlags::hasOffTi;
+	int flags = ClassFlags::hasOffTi;
 	if (cd->isCOMclass ())
 	  flags |= ClassFlags::isCOMclass;
 
@@ -962,7 +962,7 @@ public:
 	this->layout_field (null_pointer_node);
 
 	/* ClassFlags m_flags;  */
-	ClassFlags::Type flags = ClassFlags::hasOffTi;
+	int flags = ClassFlags::hasOffTi;
 	flags |= ClassFlags::hasTypeInfo;
 	if (cd->isCOMinterface ())
 	  flags |= ClassFlags::isCOMclass;
@@ -1091,7 +1091,7 @@ public:
       this->layout_field (null_pointer_node);
 
     /* StructFlags m_flags;  */
-    StructFlags::Type m_flags = 0;
+    int m_flags = StructFlags::none;
     if (ti->hasPointers ())
       m_flags |= StructFlags::hasPointers;
     this->layout_field (build_integer_cst (m_flags, d_uint_type));


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-29 16:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 16:31 [gcc r12-3210] d: Use `int` to store class and struct flags Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).