public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: chastain@cygnus.com (Michael Elizabeth Chastain)
Cc: law@redhat.com, gcc@gcc.gnu.org, libstdc++@gcc.gnu.org,
	gcc-patches@gc.gnu.org, mark@codesourcery.com
Subject: Re: GCC 3.0 Status Report
Date: Thu, 19 Apr 2001 13:07:00 -0000	[thread overview]
Message-ID: <200104192006.QAA29881@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <200104182009.NAA09066@bosch.cygnus.com>

> It's not a patch -- the patch fragment you see is the patch that
> broke g++ (I think).  I don't know enough about g++ data structures
> to write a good patch.

Here is a fix for the undefined reference std::errno.  The language
experts can debate whether it is the right thing to do.  I have checked
that `namespace std { extern "C" int errno; }' is not mangled under
hpux and I don't see any regressions of the libstdc++ or g++ testsuite
under i686 linux.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* mangle.c (mangle_decl_string): Don't mangle variables with
	extern "C" linkage.
	* decl.c (grokvardecl): Use full language declaration for `extern'
	variables.

--- mangle.c.orig	Tue Apr 17 14:38:43 2001
+++ mangle.c	Wed Apr 18 20:29:54 2001
@@ -2093,9 +2093,11 @@
 	       functions with C++ linkage.  */
 	    && (!DECL_LANG_SPECIFIC (decl) 
 		|| DECL_EXTERN_C_FUNCTION_P (decl)))
-	   /* The names of global variables aren't mangled either.  */
+	   /* The names of global and extern "C" variables aren't
+	      mangled either.  */
 	   || (TREE_CODE (decl) == VAR_DECL
-	       && CP_DECL_CONTEXT (decl) == global_namespace))
+	       && (CP_DECL_CONTEXT (decl) == global_namespace
+		   || (DECL_LANG_SPECIFIC (decl) && DECL_EXTERN_C_P (decl)))))
     write_string (IDENTIFIER_POINTER (DECL_NAME (decl)));
   else
     {
--- decl.c.orig	Mon Apr 16 17:58:53 2001
+++ decl.c	Thu Apr 19 14:58:37 2001
@@ -9022,9 +9022,10 @@
       else
 	context = NULL_TREE;
 
-      if (processing_template_decl && context)
-	/* For global variables, declared in a template, we need the
-	   full lang_decl.  */
+      if (RIDBIT_SETP (RID_EXTERN, specbits)
+	  || (processing_template_decl && context))
+	/* For `extern' variables or variables declared in a template,
+	   we need the full lang_decl.  */
 	decl = build_lang_decl (VAR_DECL, declarator, type);
       else
 	decl = build_decl (VAR_DECL, declarator, type);

       reply	other threads:[~2001-04-19 13:07 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200104182009.NAA09066@bosch.cygnus.com>
2001-04-19 13:07 ` John David Anglin [this message]
2001-04-19 13:34   ` Mark Mitchell
2001-04-19 13:39     ` John David Anglin
2001-04-19 15:41   ` Mark Mitchell
2001-04-19 17:43     ` Joe Buck
2001-04-19 17:54       ` Mark Mitchell
2001-04-19 17:30   ` Benjamin Kosnik
2001-04-22  8:41   ` Fergus Henderson
2001-06-12 17:42 Robert Schweikert
2001-06-12 18:38 ` Mark Mitchell
  -- strict thread matches above, loose matches on Subject: below --
2001-06-11 21:48 Mark Mitchell
2001-06-11 22:31 ` Loren James Rittle
2001-06-12  0:56 ` Joseph S. Myers
2001-06-12  1:17   ` Mark Mitchell
2001-06-12  1:57 ` Nathan Sidwell
2001-06-12  9:37   ` Tom Tromey
2001-06-12  3:42 ` Joseph S. Myers
2001-06-12  5:01   ` Franz Sirl
2001-06-12 19:39     ` Stan Shebs
2001-06-13  9:39       ` Mark Mitchell
2001-06-13 11:58         ` Franz Sirl
2001-06-12  5:32 ` Bernd Schmidt
2001-06-12  8:01   ` Geert Bosch
2001-06-12 16:16 ` Roman Zippel
2001-06-12 16:21   ` Mark Mitchell
2001-06-13  5:11 ` Joseph S. Myers
2001-06-13  6:00   ` Gerald Pfeifer
2001-06-13  9:45   ` Mark Mitchell
2001-06-05 13:23 Mark Mitchell
2001-06-05 13:49 ` Richard Henderson
2001-06-05 14:15 ` Rainer Orth
2001-06-05 18:09   ` Mark Mitchell
2001-06-06  4:54     ` Rainer Orth
2001-06-05 15:16 ` Joseph S. Myers
2001-06-05 15:33 ` benjamin kosnik
2001-06-05 15:56   ` Mark Mitchell
2001-06-05 15:56 ` Franz Sirl
2001-06-05 16:04   ` Mark Mitchell
2001-06-05 21:04 ` Alexandre Petit-Bianco
2001-06-05 23:08   ` Mark Mitchell
2001-05-21 18:48 Mark Mitchell
2001-05-21 20:23 ` Daniel Berlin
2001-05-22  1:44 ` Dennis Bjorklund
2001-05-22  2:33   ` Joseph S. Myers
2001-05-22  7:58   ` Mark Mitchell
2001-05-22 10:52     ` Dennis Bjorklund
2001-05-22  3:37 ` Joseph S. Myers
2001-05-22  3:53   ` Gerald Pfeifer
2001-05-22 13:51 ` Phil Edwards
2001-05-22 14:02   ` Mark Mitchell
2001-05-22 14:22 ` Toon Moene
2001-05-22 14:37   ` Mark Mitchell
2001-05-17  2:29 Christian Iseli
2001-05-14 14:28 Mark Mitchell
2001-05-14 16:44 ` Joseph S. Myers
2001-05-17  9:27   ` Joe Buck
2001-06-11 10:08     ` Joern Rennecke
2001-05-02 16:09 Mike Stump
2001-05-07  9:14 ` Joe Buck
2001-05-01 18:56 Mike Stump
2001-05-02  8:47 ` Mark Mitchell
2001-05-01 17:22 Mark Mitchell
2001-04-19 23:33 Michael Elizabeth Chastain
2001-04-19 13:27 Michael Elizabeth Chastain
2001-04-19 13:32 ` John David Anglin
2001-04-18 12:34 Michael Elizabeth Chastain
     [not found] <1654.987568477@slagheap.cygnus.com>
2001-04-18 10:38 ` John David Anglin
     [not found] <no.id>
2001-04-17 19:11 ` John David Anglin
2001-04-18  0:55   ` Mark Mitchell
2001-04-18  9:00     ` John David Anglin
2001-04-18 13:51     ` John David Anglin
2001-04-20 13:36       ` Mark Mitchell
2001-04-17 16:13 John David Anglin
2001-04-17 16:38 ` Gabriel Dos Reis
2001-04-17 18:40   ` John David Anglin
2001-04-17 10:32 Michael Elizabeth Chastain
2001-04-17  0:32 Mark Mitchell
2001-04-17 16:31 ` Toon Moene
2001-04-17 16:37   ` Mark Mitchell
2001-04-18  7:02 ` Andreas Schwab
2001-04-18 19:51   ` Mark Mitchell
2001-04-19  2:13     ` Gabriel Dos Reis
2001-04-19  8:33       ` Mark Mitchell
2001-04-19 13:36     ` Phil Edwards
2001-04-03 10:38 Mark Mitchell
2001-04-03 13:24 ` Joseph S. Myers
2001-04-03 14:22   ` Toon Moene
2001-03-27  8:55 Mark Mitchell
2001-03-27  9:51 ` David Edelsohn
2001-03-20  4:18 Peter Bienstman
2001-03-19 12:23 Mark Mitchell
2001-03-19 13:35 ` Craig Rodrigues
2001-03-19 16:04   ` Mark Mitchell
2001-03-19 17:16 ` Geoff Keating
2001-03-19 17:26   ` Mark Mitchell
2001-03-19 18:42     ` Stan Shebs
2001-03-19 19:07       ` Daniel Berlin
2001-03-19 19:53         ` Stan Shebs
2001-03-19 20:18           ` Mark Mitchell
2001-03-19 17:43   ` Daniel Berlin
2001-03-19 18:15     ` Geoff Keating
2001-03-19 18:11   ` Daniel Berlin

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=200104192006.QAA29881@hiauly1.hia.nrc.ca \
    --to=dave@hiauly1.hia.nrc.ca \
    --cc=chastain@cygnus.com \
    --cc=gcc-patches@gc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    /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: link
Be 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).