Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6ea20bd0
Commit
6ea20bd0
authored
Oct 10, 2019
by
Jason Merrill
Committed by
Jason Merrill
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cp-tree.h (template_info_decl_check): Check ENABLE_TREE_CHECKING.
From-SVN: r276787
parent
66ef6ac5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
29 deletions
+37
-29
gcc/cp/ChangeLog
+4
-0
gcc/cp/cp-tree.h
+33
-29
No files found.
gcc/cp/ChangeLog
View file @
6ea20bd0
2019-10-09 Jason Merrill <jason@redhat.com>
* cp-tree.h (template_info_decl_check): Check ENABLE_TREE_CHECKING.
2019-10-09 Marek Polacek <polacek@redhat.com>
2019-10-09 Marek Polacek <polacek@redhat.com>
PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
...
...
gcc/cp/cp-tree.h
View file @
6ea20bd0
...
@@ -593,15 +593,46 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
...
@@ -593,15 +593,46 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
TREE_CHECK(NODE,BOUND_TEMPLATE_TEMPLATE_PARM)
TREE_CHECK(NODE,BOUND_TEMPLATE_TEMPLATE_PARM)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Returns t iff the node can have a TEMPLATE_INFO field. */
inline
tree
template_info_decl_check
(
const_tree
t
,
const
char
*
f
,
int
l
,
const
char
*
fn
)
{
switch
(
TREE_CODE
(
t
))
{
case
VAR_DECL
:
case
FUNCTION_DECL
:
case
FIELD_DECL
:
case
TYPE_DECL
:
case
CONCEPT_DECL
:
case
TEMPLATE_DECL
:
return
const_cast
<
tree
>
(
t
);
default
:
break
;
}
tree_check_failed
(
t
,
f
,
l
,
fn
,
VAR_DECL
,
FUNCTION_DECL
,
FIELD_DECL
,
TYPE_DECL
,
CONCEPT_DECL
,
TEMPLATE_DECL
,
0
);
gcc_unreachable
();
}
#define TEMPLATE_INFO_DECL_CHECK(NODE) \
template_info_decl_check ((NODE), __FILE__, __LINE__, __FUNCTION__)
#define THUNK_FUNCTION_CHECK(NODE) __extension__ \
#define THUNK_FUNCTION_CHECK(NODE) __extension__ \
({ __typeof (NODE) const __t = (NODE); \
({ __typeof (NODE) const __t = (NODE); \
if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific \
if (TREE_CODE (__t) != FUNCTION_DECL || !__t->decl_common.lang_specific \
|| !__t->decl_common.lang_specific->u.fn.thunk_p) \
|| !__t->decl_common.lang_specific->u.fn.thunk_p) \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \
tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, 0); \
__t; })
__t; })
#else
#else
/* ENABLE_TREE_CHECKING */
#define TEMPLATE_INFO_DECL_CHECK(NODE) (NODE)
#define THUNK_FUNCTION_CHECK(NODE) (NODE)
#define THUNK_FUNCTION_CHECK(NODE) (NODE)
#endif
#endif
/* ENABLE_TREE_CHECKING */
/* Language-dependent contents of an identifier. */
/* Language-dependent contents of an identifier. */
...
@@ -3348,33 +3379,6 @@ struct GTY(()) lang_decl {
...
@@ -3348,33 +3379,6 @@ struct GTY(()) lang_decl {
#define TEMPLATE_DECL_COMPLEX_ALIAS_P(NODE) \
#define TEMPLATE_DECL_COMPLEX_ALIAS_P(NODE) \
DECL_LANG_FLAG_2 (TEMPLATE_DECL_CHECK (NODE))
DECL_LANG_FLAG_2 (TEMPLATE_DECL_CHECK (NODE))
/* Returns t iff the node can have a TEMPLATE_INFO field. */
inline
tree
template_info_decl_check
(
const_tree
t
,
const
char
*
f
,
int
l
,
const
char
*
fn
)
{
switch
(
TREE_CODE
(
t
))
{
case
VAR_DECL
:
case
FUNCTION_DECL
:
case
FIELD_DECL
:
case
TYPE_DECL
:
case
CONCEPT_DECL
:
case
TEMPLATE_DECL
:
return
const_cast
<
tree
>
(
t
);
default:
break
;
}
tree_check_failed
(
t
,
f
,
l
,
fn
,
VAR_DECL
,
FUNCTION_DECL
,
FIELD_DECL
,
TYPE_DECL
,
CONCEPT_DECL
,
TEMPLATE_DECL
,
0
);
gcc_unreachable
();
}
#define TEMPLATE_INFO_DECL_CHECK(NODE) \
template_info_decl_check ((NODE), __FILE__, __LINE__, __FUNCTION__)
/* Nonzero for a type which is an alias for another type; i.e, a type
/* Nonzero for a type which is an alias for another type; i.e, a type
which declaration was written 'using name-of-type =
which declaration was written 'using name-of-type =
another-type'. */
another-type'. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment