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
1dee8996
Commit
1dee8996
authored
Nov 04, 2019
by
Jason Merrill
Committed by
Jason Merrill
Nov 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* typeck.c (check_return_expr): Avoid redundant error.
From-SVN: r277798
parent
955cd057
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
gcc/cp/ChangeLog
+4
-0
gcc/cp/typeck.c
+1
-1
gcc/testsuite/g++.dg/other/return2.C
+7
-0
No files found.
gcc/cp/ChangeLog
View file @
1dee8996
2019-11-04 Jason Merrill <jason@redhat.com>
* typeck.c (check_return_expr): Avoid redundant error.
2019-11-02 Paolo Carlini <paolo.carlini@oracle.com>
2019-11-02 Paolo Carlini <paolo.carlini@oracle.com>
* typeck.c (composite_pointer_type): Add a const op_location_t&
* typeck.c (composite_pointer_type): Add a const op_location_t&
...
...
gcc/cp/typeck.c
View file @
1dee8996
...
@@ -9729,7 +9729,7 @@ check_return_expr (tree retval, bool *no_warning)
...
@@ -9729,7 +9729,7 @@ check_return_expr (tree retval, bool *no_warning)
type. In that case, we have to evaluate the expression for
type. In that case, we have to evaluate the expression for
its side-effects. */
its side-effects. */
finish_expr_stmt
(
retval
);
finish_expr_stmt
(
retval
);
else
else
if
(
retval
!=
error_mark_node
)
permerror
(
input_location
,
permerror
(
input_location
,
"return-statement with a value, in function "
"return-statement with a value, in function "
"returning %qT"
,
valtype
);
"returning %qT"
,
valtype
);
...
...
gcc/testsuite/g++.dg/other/return2.C
0 → 100644
View file @
1dee8996
void
f
(
long
);
void
f
(
char
);
void
g
()
{
return
f
(
42
);
// { dg-error "ambiguous" }
}
// { dg-bogus "void" "" { target *-*-* } .-1 }
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