re PR c++/29291 (ICE on invalid use of new)
PR c++/29291 * init.c (build_new): Check for invalid init. * g++.dg/parse/new4.C: New test. From-SVN: r117393
This commit is contained in:
parent
36a43def8a
commit
95fb85c625
|
@ -1,3 +1,8 @@
|
|||
2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/29291
|
||||
* init.c (build_new): Check for invalid init.
|
||||
|
||||
2006-10-02 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/29226
|
||||
|
|
|
@ -2075,7 +2075,8 @@ build_new (tree placement, tree type, tree nelts, tree init,
|
|||
tree orig_nelts;
|
||||
tree orig_init;
|
||||
|
||||
if (placement == error_mark_node || type == error_mark_node)
|
||||
if (placement == error_mark_node || type == error_mark_node
|
||||
|| init == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
orig_placement = placement;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/29291
|
||||
* g++.dg/parse/new4.C: New test.
|
||||
|
||||
2006-10-03 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
* gcc-dg/pthread-init-common.h: Define _GNU_SOURCE. Add tests for
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// PR c++/29291
|
||||
// { dg-do compile }
|
||||
|
||||
template<int> void foo()
|
||||
{
|
||||
new int(; // { dg-error "before" }
|
||||
}
|
Loading…
Reference in New Issue