aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-05-22 22:52:32 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-05-22 22:52:32 +0000
commit421844e7209277ce775c5b635a5cc76906df94e9 (patch)
tree6319116f418cc5370863bfb90a208f517c9c0b29 /gcc/cp/semantics.c
parent46972a3631a4753e90899e09149fc6febbd64c73 (diff)
downloadgcc-421844e7209277ce775c5b635a5cc76906df94e9.zip
gcc-421844e7209277ce775c5b635a5cc76906df94e9.tar.gz
gcc-421844e7209277ce775c5b635a5cc76906df94e9.tar.bz2
cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
* cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. (DECL_CONV_FN_P): Simplify. (DECL_OPERATOR): Remove. (language_to_string): Declare. * decl.c (duplicate_decls): Fix typo in comment. (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. (grok_op_properties): Use DECL_CONV_FN_P instead of IDENTIFIER_TYPENAME_P. * dump.c (dequeue_and_dump): Dump the language linkage of declarations. * error.c (language_to_string): Give it external linkage. * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. (implicitly_declare_fn): Set DECL_LANGUAGE. * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not IDENTIFIER_TYPENAME_P. (tsubst_decl): Likewise. (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. * semantics.c (finish_member_declaration): Don't mark members of classes declared in an extern "C" region as extern "C". From-SVN: r34095
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 8f9a28b..b5cf689 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2004,6 +2004,13 @@ finish_member_declaration (decl)
/* Mark the DECL as a member of the current class. */
DECL_CONTEXT (decl) = current_class_type;
+ /* [dcl.link]
+
+ A C language linkage is ignored for the names of class members
+ and the member function type of class member functions. */
+ if (DECL_LANG_SPECIFIC (decl) && DECL_LANGUAGE (decl) == lang_c)
+ DECL_LANGUAGE (decl) = lang_cplusplus;
+
/* Put functions on the TYPE_METHODS list and everything else on the
TYPE_FIELDS list. Note that these are built up in reverse order.
We reverse them (to obtain declaration order) in finish_struct. */