public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RS6000 buried treasure - NO_IMPLICIT_EXTERN_C
@ 2002-11-07 20:50 Zack Weinberg
  2002-11-08  7:56 ` David Edelsohn
  2002-11-08 11:10 ` Mark Mitchell
  0 siblings, 2 replies; 8+ messages in thread
From: Zack Weinberg @ 2002-11-07 20:50 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-11-08 22:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07 20:50 RS6000 buried treasure - NO_IMPLICIT_EXTERN_C Zack Weinberg
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

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).