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
efd115c1
Commit
efd115c1
authored
13 years ago
by
Jason Merrill
Committed by
Jason Merrill
13 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl.c (grokdeclarator): Only set DECL_DECLARED_CONSTEXPR_P once.
From-SVN: r173680
parent
f5ad54d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
gcc/cp/ChangeLog
+2
-0
gcc/cp/decl.c
+7
-5
No files found.
gcc/cp/ChangeLog
View file @
efd115c1
2011-05-11 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Only set DECL_DECLARED_CONSTEXPR_P once.
* pt.c (build_non_dependent_expr): Don't check null_ptr_cst_p,
do call maybe_constant_value in C++0x mode.
* semantics.c (cxx_eval_constant_expression): Handle TEMPLATE_DECL.
...
...
This diff is collapsed.
Click to expand it.
gcc/cp/decl.c
View file @
efd115c1
...
...
@@ -9933,7 +9933,6 @@ grokdeclarator (const cp_declarator *declarator,
return
error_mark_node
;
}
DECL_DECLARED_CONSTEXPR_P
(
decl
)
=
constexpr_p
;
decl
=
do_friend
(
ctype
,
unqualified_id
,
decl
,
*
attrlist
,
flags
,
funcdef_flag
);
...
...
@@ -10183,8 +10182,11 @@ grokdeclarator (const cp_declarator *declarator,
}
}
else
if
(
constexpr_p
&&
DECL_EXTERNAL
(
decl
))
error
(
"declaration of constexpr variable %qD is not a definition"
,
decl
);
{
error
(
"declaration of constexpr variable %qD is not a definition"
,
decl
);
constexpr_p
=
false
;
}
}
if
(
storage_class
==
sc_extern
&&
initialized
&&
!
funcdef_flag
)
...
...
@@ -10213,8 +10215,8 @@ grokdeclarator (const cp_declarator *declarator,
else
if
(
storage_class
==
sc_static
)
DECL_THIS_STATIC
(
decl
)
=
1
;
/*
Don't forget constexprness
. */
if
(
constexpr_p
)
/*
Set constexpr flag on vars (functions got it in grokfndecl)
. */
if
(
constexpr_p
&&
TREE_CODE
(
decl
)
==
VAR_DECL
)
DECL_DECLARED_CONSTEXPR_P
(
decl
)
=
true
;
/* Record constancy and volatility on the DECL itself . There's
...
...
This diff is collapsed.
Click to expand it.
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