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
5fb8060d
Commit
5fb8060d
authored
Jul 11, 2011
by
Jason Merrill
Committed by
Jason Merrill
Jul 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl2.c (decl_constant_var_p): Use decl_maybe_constant_var_p.
From-SVN: r176177
parent
4904b64b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
gcc/cp/ChangeLog
+2
-0
gcc/cp/decl2.c
+3
-13
No files found.
gcc/cp/ChangeLog
View file @
5fb8060d
2011-07-11 Jason Merrill <jason@redhat.com>
* decl2.c (decl_constant_var_p): Use decl_maybe_constant_var_p.
PR c++/44609
* cp-tree.h (struct tinst_level): Add errors field.
* pt.c (neglectable_inst_p, limit_bad_template_recurson): New.
...
...
gcc/cp/decl2.c
View file @
5fb8060d
...
...
@@ -3574,26 +3574,16 @@ decl_defined_p (tree decl)
bool
decl_constant_var_p
(
tree
decl
)
{
bool
ret
;
tree
type
=
TREE_TYPE
(
decl
);
if
(
TREE_CODE
(
decl
)
!=
VAR_DECL
)
if
(
!
decl_maybe_constant_var_p
(
decl
))
return
false
;
if
(
DECL_DECLARED_CONSTEXPR_P
(
decl
)
||
(
CP_TYPE_CONST_NON_VOLATILE_P
(
type
)
&&
INTEGRAL_OR_ENUMERATION_TYPE_P
(
type
)))
{
/* We don't know if a template static data member is initialized with
a constant expression until we instantiate its initializer. Even
in the case of a constexpr variable, we can't treat it as a
constant until its initializer is complete in case it's used in
its own initializer. */
mark_used
(
decl
);
ret
=
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
decl
);
}
else
ret
=
false
;
return
ret
;
return
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P
(
decl
);
}
/* Returns true if DECL could be a symbolic constant variable, depending on
...
...
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