decl2.c (grokclassfn): Set DECL_LANGUAGE here.

* decl2.c (grokclassfn): Set DECL_LANGUAGE here.
	* method.c (implicitly_declare_fn): Not here.

From-SVN: r34194
This commit is contained in:
Mark Mitchell 2000-05-26 16:54:18 +00:00 committed by Mark Mitchell
parent 1bc48f824a
commit cab8bde98e
4 changed files with 25 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2000-05-26 Mark Mitchell <mark@codesourcery.com>
* decl2.c (grokclassfn): Set DECL_LANGUAGE here.
* method.c (implicitly_declare_fn): Not here.
2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...

View file

@ -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");

View file

@ -2581,9 +2581,6 @@ implicitly_declare_fn (kind, type, const_p)
DECL_NOT_REALLY_EXTERN (fn) = 1;
DECL_THIS_INLINE (fn) = 1;
DECL_INLINE (fn) = 1;
/* Even within an `extern "C"' block, members get C++ linkage. See
[dcl.link] for details. */
DECL_LANGUAGE (fn) = lang_cplusplus;
defer_fn (fn);
return fn;

View file

@ -0,0 +1,16 @@
// Build don't link:
// Origin: Boris Zentner <boris@m2b.de>
extern "C"
{
struct xx
{
int x;
xx();
};
xx::xx()
{
x = 0;
}
}