Skip to content

Commit

Permalink
Add _Dependent_ptr qualifier revision
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshat Garg committed Jul 17, 2019
1 parent b4c3c55 commit 2accdd2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions gcc/c/c-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2573,6 +2573,7 @@ c_parser_static_assert_declaration_no_semi (c_parser *parser)
volatile
address-space-qualifier
_Atomic
_Dependent_ptr

(restrict is new in C99.)
(_Atomic is new in C11.)
Expand Down
3 changes: 3 additions & 0 deletions gcc/c/c-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ along with GCC; see the file COPYING3. If not see
/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is volatile. */
#define C_TYPE_FIELDS_VOLATILE(TYPE) TREE_LANG_FLAG_2 (TYPE)

/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is dependent pointer. */
#define C_TYPE_FIELDS_DEPENDENT_PTR(TYPE) TREE_LANG_FLAG_3 (TYPE)

/* In a RECORD_TYPE or UNION_TYPE or ENUMERAL_TYPE
nonzero if the definition of the type has already started. */
#define C_TYPE_BEING_DEFINED(TYPE) TYPE_LANG_FLAG_0 (TYPE)
Expand Down
4 changes: 2 additions & 2 deletions gcc/tree-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ struct GTY(()) tree_base {
unsigned asm_written_flag: 1;
unsigned nowarning_flag : 1;
unsigned visited : 1;
unsigned dependent_ptr_flag : 1;

unsigned used_flag : 1;
unsigned nothrow_flag : 1;
Expand Down Expand Up @@ -976,8 +977,7 @@ struct GTY(()) tree_base {
unsigned user_align : 1;
unsigned nameless_flag : 1;
unsigned atomic_flag : 1;
unsigned dependent_ptr_flag : 1;
unsigned spare0 : 2;
unsigned spare0 : 3;

unsigned spare1 : 8;

Expand Down
5 changes: 4 additions & 1 deletion gcc/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
If this bit is set in an expression, so is TREE_SIDE_EFFECTS. */
#define TREE_THIS_VOLATILE(NODE) ((NODE)->base.volatile_flag)

/* Nonzero means this expression is having data dependence somewhere. */
#define TREE_THIS_DEPENDENT_PTR(NODE) ((NODE)->base.dependent_ptr_flag)

/* Nonzero means this node will not trap. In an INDIRECT_REF, means
accessing the memory pointed to won't generate a trap. However,
this only applies to an object when used appropriately: it doesn't
Expand Down Expand Up @@ -2052,7 +2055,7 @@ extern machine_mode vector_type_mode (const_tree);
#define TYPE_ATOMIC(NODE) (TYPE_CHECK (NODE)->base.u.bits.atomic_flag)

/* Nonzero in a type considered dependent_ptr as a whole. */
#define TYPE_DEPENDENT_PTR(NODE) (TYPE_CHECK (NODE)->base.u.bits.dependent_ptr_flag)
#define TYPE_DEPENDENT_PTR(NODE) (TYPE_CHECK (NODE)->base.dependent_ptr_flag)

/* Means this type is const-qualified. */
#define TYPE_READONLY(NODE) (TYPE_CHECK (NODE)->base.readonly_flag)
Expand Down

0 comments on commit 2accdd2

Please sign in to comment.