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
7a74aa7f
Commit
7a74aa7f
authored
Aug 23, 2011
by
Jason Merrill
Committed by
Jason Merrill
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* semantics.c (potential_constant_expression_1): Allow 'this'.
From-SVN: r177993
parent
09e640b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
gcc/cp/ChangeLog
+4
-0
gcc/cp/semantics.c
+0
-14
No files found.
gcc/cp/ChangeLog
View file @
7a74aa7f
2011-08-23 Jason Merrill <jason@redhat.com>
* semantics.c (potential_constant_expression_1): Allow 'this'.
2011-08-23 Jakub Jelinek <jakub@redhat.com>
2011-08-23 Jakub Jelinek <jakub@redhat.com>
PR c++/50158
PR c++/50158
...
...
gcc/cp/semantics.c
View file @
7a74aa7f
...
@@ -7681,21 +7681,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
...
@@ -7681,21 +7681,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case
IDENTIFIER_NODE
:
case
IDENTIFIER_NODE
:
/* We can see a FIELD_DECL in a pointer-to-member expression. */
/* We can see a FIELD_DECL in a pointer-to-member expression. */
case
FIELD_DECL
:
case
FIELD_DECL
:
return
true
;
case
PARM_DECL
:
case
PARM_DECL
:
/* -- this (5.1) unless it appears as the postfix-expression in a
class member access expression, including the result of the
implicit transformation in the body of the non-static
member function (9.3.1); */
/* FIXME this restriction seems pointless since the standard dropped
"potential constant expression". */
if
(
is_this_parameter
(
t
))
{
if
(
flags
&
tf_error
)
error
(
"%qE is not a potential constant expression"
,
t
);
return
false
;
}
return
true
;
return
true
;
case
AGGR_INIT_EXPR
:
case
AGGR_INIT_EXPR
:
...
...
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