OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a238647
)
PR c++/51416
author
jason
<jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Dec 2011 13:51:51 +0000
(13:51 +0000)
committer
jason
<jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Dec 2011 13:51:51 +0000
(13:51 +0000)
* init.c (build_value_init_noctor): Check for incomplete type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182435
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/cp/init.c
patch
|
blob
|
history
diff --git
a/gcc/cp/init.c
b/gcc/cp/init.c
index
98a80e3
..
2355a04
100644
(file)
--- a/
gcc/cp/init.c
+++ b/
gcc/cp/init.c
@@
-377,6
+377,12
@@
build_value_init (tree type, tsubst_flags_t complain)
tree
build_value_init_noctor (tree type, tsubst_flags_t complain)
{
+ if (!COMPLETE_TYPE_P (type))
+ {
+ if (complain & tf_error)
+ error ("value-initialization of incomplete type %qT", type);
+ return error_mark_node;
+ }
/* FIXME the class and array cases should just use digest_init once it is
SFINAE-enabled. */
if (CLASS_TYPE_P (type))