Commit dc139eb1 by Martin Sebor Committed by Martin Sebor

tree.def (TYPE_SIZE): Clarify.


gcc/ChangeLog:

	* tree.def (TYPE_SIZE): Clarify.
	* tree.h (TYPE_SIZE, TYPE_SIZE_UNIT, DECL_SIZE): Add comments.

From-SVN: r274575
parent edf2da1e
2019-08-16 Martin Sebor <msebor@redhat.com>
* tree.def (TYPE_SIZE): Clarify.
* tree.h (TYPE_SIZE, TYPE_SIZE_UNIT, DECL_SIZE): Add comments.
2019-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de> 2019-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/91109 PR tree-optimization/91109
......
...@@ -77,7 +77,10 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0) ...@@ -77,7 +77,10 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
/* Each data type is represented by a tree node whose code is one of /* Each data type is represented by a tree node whose code is one of
the following: */ the following: */
/* Each node that represents a data type has a component TYPE_SIZE /* Each node that represents a data type has a component TYPE_SIZE
containing a tree that is an expression for the size in bits. that evaluates either to a tree that is a (potentially non-constant)
expression representing the type size in bits, or to a null pointer
when the size of the type is unknown (for example, for incomplete
types such as arrays of unspecified bound).
The TYPE_MODE contains the machine mode for values of this type. The TYPE_MODE contains the machine mode for values of this type.
The TYPE_POINTER_TO field contains a type for a pointer to this type, The TYPE_POINTER_TO field contains a type for a pointer to this type,
or zero if no such has been created yet. or zero if no such has been created yet.
......
...@@ -1952,7 +1952,10 @@ class auto_suppress_location_wrappers ...@@ -1952,7 +1952,10 @@ class auto_suppress_location_wrappers
so they must be checked as well. */ so they must be checked as well. */
#define TYPE_UID(NODE) (TYPE_CHECK (NODE)->type_common.uid) #define TYPE_UID(NODE) (TYPE_CHECK (NODE)->type_common.uid)
/* Type size in bits as a tree expression. Need not be constant
and may be null. */
#define TYPE_SIZE(NODE) (TYPE_CHECK (NODE)->type_common.size) #define TYPE_SIZE(NODE) (TYPE_CHECK (NODE)->type_common.size)
/* Likewise, type size in bytes. */
#define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->type_common.size_unit) #define TYPE_SIZE_UNIT(NODE) (TYPE_CHECK (NODE)->type_common.size_unit)
#define TYPE_POINTER_TO(NODE) (TYPE_CHECK (NODE)->type_common.pointer_to) #define TYPE_POINTER_TO(NODE) (TYPE_CHECK (NODE)->type_common.pointer_to)
#define TYPE_REFERENCE_TO(NODE) (TYPE_CHECK (NODE)->type_common.reference_to) #define TYPE_REFERENCE_TO(NODE) (TYPE_CHECK (NODE)->type_common.reference_to)
...@@ -2480,7 +2483,7 @@ extern machine_mode vector_type_mode (const_tree); ...@@ -2480,7 +2483,7 @@ extern machine_mode vector_type_mode (const_tree);
#define DECL_INITIAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.initial) #define DECL_INITIAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.initial)
/* Holds the size of the datum, in bits, as a tree expression. /* Holds the size of the datum, in bits, as a tree expression.
Need not be constant. */ Need not be constant and may be null. */
#define DECL_SIZE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size) #define DECL_SIZE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size)
/* Likewise for the size in bytes. */ /* Likewise for the size in bytes. */
#define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit) #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment