public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <chastain@cygnus.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/2445: undefined reference to `std::errno' Date: Sun, 15 Apr 2001 00:46:00 -0000 [thread overview] Message-ID: <20010415074601.691.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR libstdc++/2445; it has been noted by GNATS. From: Michael Elizabeth Chastain <chastain@cygnus.com> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: libstdc++/2445: undefined reference to `std::errno' Date: Sun, 15 Apr 2001 00:41:49 -0700 Hmmm, this patch fragment looks suspicious to me. It handles extern "C" functions, and it handles extern "C" variables in the global namespace. I suspect that it also needs to handle extern "C" variables in subordinate namespaces. diff -u -r -N 2001-03-20-14-00-00/source/gcc/cp/mangle.c 2001-03-20-14-05-00/source/gcc/cp/mangle.c --- 2001-03-20-14-00-00/source/gcc/cp/mangle.c Thu Feb 22 13:37:39 2001 +++ 2001-03-20-14-05-00/source/gcc/cp/mangle.c Tue Mar 20 14:03:45 2001 @@ -2069,6 +2069,17 @@ if (TREE_CODE (decl) == TYPE_DECL) write_type (TREE_TYPE (decl)); + else if (/* The names of `extern "C"' functions are not mangled. */ + (TREE_CODE (decl) == FUNCTION_DECL + /* If there's no DECL_LANG_SPECIFIC, it's a function built + by language-independent code, which never builds + functions with C++ linkage. */ + && (!DECL_LANG_SPECIFIC (decl) + || DECL_EXTERN_C_FUNCTION_P (decl))) + /* The names of global variables aren't mangled either. */ + || (TREE_CODE (decl) == VAR_DECL + && CP_DECL_CONTEXT (decl) == global_namespace)) + write_string (IDENTIFIER_POINTER (DECL_NAME (decl))); else { write_mangled_name (decl);
next reply other threads:[~2001-04-15 0:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-04-15 0:46 Michael Elizabeth Chastain [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-04-15 0:26 Michael Elizabeth Chastain 2001-03-31 14:26 Michael Elizabeth Chastain
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010415074601.691.qmail@sourceware.cygnus.com \ --to=chastain@cygnus.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).