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
1e799955
Commit
1e799955
authored
Nov 10, 2009
by
Jason Merrill
Committed by
Jason Merrill
Nov 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* call.c (build_op_delete_call): Tweak error.
From-SVN: r154073
parent
58926110
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
gcc/cp/ChangeLog
+5
-1
gcc/cp/call.c
+4
-2
gcc/testsuite/ChangeLog
+3
-1
gcc/testsuite/g++.dg/init/placement5.C
+18
-0
No files found.
gcc/cp/ChangeLog
View file @
1e799955
2009-11-09 Jason Merrill <jason@redhat.com>
2009-11-10 Jason Merrill <jason@redhat.com>
* call.c (build_op_delete_call): Tweak error.
PR c++/34158
PR c++/36406
...
...
@@ -8,6 +10,8 @@
* pt.c (primary_template_instantiation_p): Non-static.
* cp-tree.h: Declare it.
2009-11-09 Jason Merrill <jason@redhat.com>
PR c++/41972
* parser.c (cp_parser_template_argument): Accept SCOPE_REF around
VAR_DECL.
...
...
gcc/cp/call.c
View file @
1e799955
...
...
@@ -4613,8 +4613,10 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
deallocation function, would have been selected as a match for the
allocation function, the program is ill-formed." */
if
(
non_placement_deallocation_fn_p
(
fn
))
error
(
"non-placement deallocation function %qD selected for "
"placement delete"
,
fn
);
{
error
(
"non-placement deallocation function %q+D"
,
fn
);
error
(
"selected for placement delete"
);
}
}
else
/* "Any non-placement deallocation function matches a non-placement
...
...
gcc/testsuite/ChangeLog
View file @
1e799955
2009-11-09 Jason Merrill <jason@redhat.com>
2009-11-10 Jason Merrill <jason@redhat.com>
* g++.dg/init/placement5.C: New.
PR c++/34158
* g++.dg/init/placement4.C: New.
...
...
gcc/testsuite/g++.dg/init/placement5.C
0 → 100644
View file @
1e799955
// 5.3.4/19: If the lookup finds the two-parameter form of a usual
// deallocation function (3.7.4.2) and that function, considered as a
// placement deallocation function, would have been selected as a match for
// the allocation function, the program is ill-formed.
typedef
__SIZE_TYPE__
size_t
;
struct
A
{
A
();
static
void
*
operator
new
(
size_t
,
size_t
);
static
void
operator
delete
(
void
*
,
size_t
);
// { dg-error "non-placement" }
};
int
main
()
{
A
*
ap
=
new
(
24
)
A
;
// { dg-error "placement delete" }
}
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