diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1999-03-18 20:21:05 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-03-18 20:21:05 -0500 |
commit | c16c47fbf04fa8f4a89b78451c6c1db65feefba1 (patch) | |
tree | 4848bb759d2f48031ec0df3b8a181910c50671f1 | |
parent | 192babfd6b55504d299cbd7908ca32d7434b0985 (diff) | |
download | gcc-c16c47fbf04fa8f4a89b78451c6c1db65feefba1.zip gcc-c16c47fbf04fa8f4a89b78451c6c1db65feefba1.tar.gz gcc-c16c47fbf04fa8f4a89b78451c6c1db65feefba1.tar.bz2 |
friend.c (make_friend_class): Avoid core dump when not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
* friend.c (make_friend_class): Avoid core dump when
not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
* decl.c (start_function): Suppress normal linkage heuristics
for #pragma interface under MULTIPLE_SYMBOL_SPACES.
From-SVN: r25857
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/decl.c | 14 | ||||
-rw-r--r-- | gcc/cp/friend.c | 3 |
3 files changed, 26 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ddbecb5..1876601 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +1999-03-19 Chip Salzenberg <chip@perlsupport.com> + + * friend.c (make_friend_class): Avoid core dump when + not-yet-defined friend type lacks TYPE_LANG_SPECIFIC(). + +1999-03-18 Jason Merrill <jason@yorick.cygnus.com> + + * decl.c (start_function): Suppress normal linkage heuristics + for #pragma interface under MULTIPLE_SYMBOL_SPACES. + 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br> * Make-lang.in: ($(INTL_TARGETS)): depend on cp/parse.c diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a416c2d..200c8c4 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13133,6 +13133,20 @@ start_function (declspecs, declarator, attrs, pre_parsed_p) DECL_NOT_REALLY_EXTERN (decl1) = 0; DECL_INTERFACE_KNOWN (decl1) = 1; } + else if (interface_unknown && interface_only + && (! DECL_TEMPLATE_INSTANTIATION (decl1) + || flag_alt_external_templates)) + { + /* If MULTIPLE_SYMBOL_SPACES is defined and we saw a #pragma + interface, we will have interface_only set but not + interface_known. In that case, we don't want to use the normal + heuristics because someone will supply a #pragma implementation + elsewhere, and deducing it here would produce a conflict. */ + comdat_linkage (decl1); + DECL_EXTERNAL (decl1) = 0; + DECL_INTERFACE_KNOWN (decl1) = 1; + DECL_DEFER_OUTPUT (decl1) = 1; + } else { /* This is a definition, not a reference. diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index 8bcdcc4..30b3c51 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -263,7 +263,8 @@ make_friend_class (type, friend_type) return; } - if (CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type) + if (CLASS_TYPE_P (friend_type) + && CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type) && uses_template_parms (friend_type)) { /* [temp.friend] |