public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Subject: RS6000 buried treasure - NO_IMPLICIT_EXTERN_C
Date: Thu, 07 Nov 2002 20:50:00 -0000	[thread overview]
Message-ID: <20021108045045.GN795@egil.codesourcery.com> (raw)

Of all the targets using config/rs6000, only *-linux* and *-windiss*
define NO_IMPLICIT_EXTERN_C.  This just bit me good and hard while
trying to use powerpc-eabisimaltivec -- altivec.h assumes it is safe
to use C++ constructs which will spew errors under extern "C".

I am inclined to enable NO_IMPLICIT_EXTERN_C for the entire directory,
in rs6000.h.  What few targets this is inappropriate for -- I'm
willing to bet that's either none, or only AIX 3.1 -- can #undef it
again.

Comments?

zw

	* config/rs6000/rs6000.h: Define NO_IMPLICIT_EXTERN_C here...
	* config/rs6000/linux.h, config/rs6000/linux64.h,
	config/rs6000/windiss.h: ... not here.

===================================================================
Index: config/rs6000/rs6000.h
--- config/rs6000/rs6000.h	4 Nov 2002 16:57:09 -0000	1.234
+++ config/rs6000/rs6000.h	8 Nov 2002 04:49:15 -0000
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 /* Note that some other tm.h files include this one and then override
    many of the definitions.  */
 
+/* Header files should be C++ aware in general.  */
+#define NO_IMPLICIT_EXTERN_C
+
 /* Definitions for the object file format.  These are set at
    compile-time.  */
 
===================================================================
Index: config/rs6000/linux.h
--- config/rs6000/linux.h	14 Sep 2002 13:12:53 -0000	1.33
+++ config/rs6000/linux.h	8 Nov 2002 04:49:14 -0000
@@ -21,9 +21,6 @@ along with GNU CC; see the file COPYING.
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
 
===================================================================
Index: config/rs6000/linux64.h
--- config/rs6000/linux64.h	20 Sep 2002 23:46:59 -0000	1.30
+++ config/rs6000/linux64.h	8 Nov 2002 04:49:14 -0000
@@ -106,9 +106,6 @@ Boston, MA 02111-1307, USA.  */
    So we have to squirrel it away with this.  */
 #define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init ()
 
-/* Don't assume anything about the header files.  */
-#define NO_IMPLICIT_EXTERN_C
-
 /* Override svr4.h  */
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
===================================================================
Index: config/rs6000/windiss.h
--- config/rs6000/windiss.h	7 May 2002 14:42:29 -0000	1.1
+++ config/rs6000/windiss.h	8 Nov 2002 04:49:15 -0000
@@ -45,5 +45,3 @@ Boston, MA 02111-1307, USA.  */
 
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 16
-
-#define NO_IMPLICIT_EXTERN_C

             reply	other threads:[~2002-11-08  4:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07 20:50 Zack Weinberg [this message]
2002-11-08  7:56 ` David Edelsohn
2002-11-08 11:20   ` Zack Weinberg
2002-11-08 11:35     ` Dale Johannesen
2002-11-08 13:14       ` Stan Shebs
2002-11-08 13:48         ` Zack Weinberg
2002-11-08 14:23     ` David Edelsohn
2002-11-08 11:10 ` Mark Mitchell

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=20021108045045.GN795@egil.codesourcery.com \
    --to=zack@codesourcery.com \
    --cc=gcc-patches@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: 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).