aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 315e3c8..11250e7 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1034,6 +1034,10 @@ grokclassfn (ctype, function, flags, quals)
tree fn_name = DECL_NAME (function);
int this_quals = TYPE_UNQUALIFIED;
+ /* Even within an `extern "C"' block, members get C++ linkage. See
+ [dcl.link] for details. */
+ DECL_LANGUAGE (function) = lang_cplusplus;
+
if (fn_name == NULL_TREE)
{
error ("name missing for member function");