diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-23 15:11:22 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-23 15:11:22 +0000 |
commit | 8ef83079e8afeb0ada8dd045ecca74cc63025815 (patch) | |
tree | 44efa0a8d484a43a1c9fdcb6ee639b42bc12b3b8 /gcc/cp/decl2.c | |
parent | d1f34b6d3ee83ad3edafcebe24e66b410c8b99e3 (diff) | |
download | gcc-8ef83079e8afeb0ada8dd045ecca74cc63025815.tar.gz |
2010-03-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 157669
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@157672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 81d7ee3212f..9da69e61595 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -908,8 +908,13 @@ grokfield (const cp_declarator *declarator, } else if (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE) { - gcc_assert (error_operand_p (init) || integer_zerop (init)); - DECL_PURE_VIRTUAL_P (value) = 1; + if (integer_zerop (init)) + DECL_PURE_VIRTUAL_P (value) = 1; + else if (error_operand_p (init)) + ; /* An error has already been reported. */ + else + error ("invalid initializer for member function %qD", + value); } else { @@ -1655,7 +1660,8 @@ vague_linkage_p (tree decl) return (DECL_COMDAT (decl) || (((TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)) - || DECL_TEMPLATE_INSTANTIATION (decl)) + || (DECL_LANG_SPECIFIC (decl) + && DECL_TEMPLATE_INSTANTIATION (decl))) && TREE_PUBLIC (decl))); } |