Commit adae082f by Mark Mitchell Committed by Mark Mitchell

* decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.

From-SVN: r34742
parent 49199692
2000-06-27 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2000-06-26 Nathan Sidwell <nathan@codesourcery.com> 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
* search.c (hides): Remove. * search.c (hides): Remove.
......
...@@ -8862,7 +8862,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals, ...@@ -8862,7 +8862,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
/* If this decl has namespace scope, set that up. */ /* If this decl has namespace scope, set that up. */
if (in_namespace) if (in_namespace)
set_decl_namespace (decl, in_namespace, friendp); set_decl_namespace (decl, in_namespace, friendp);
else if (publicp && ! ctype) else if (!ctype)
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace); DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
/* `main' and builtins have implicit 'C' linkage. */ /* `main' and builtins have implicit 'C' linkage. */
......
// Build don't link:
// Origin: Chip Salzenberg <chip@valinux.com>
namespace N {
enum { E = 0 };
static int f() { return E; }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment