This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix warnings on darwin


This fixes some warnings on Darwin.

Not really tested, because of

insn-attrtab.c: In function `internal_insn_latency':
insn-attrtab.c:18461: warning: ISO C forbids empty initializer braces

but at least the build gets to that point with -j2, which it didn't before.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-warn1.patch===========================
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.16435
diff -u -p -u -p -r1.16435 ChangeLog
--- ChangeLog	21 Jan 2003 23:10:00 -0000	1.16435
+++ ChangeLog	22 Jan 2003 01:08:54 -0000
@@ -1,3 +1,11 @@
+2003-01-21  Geoffrey Keating  <geoffk@apple.com>
+
+	* config/rs6000/rs6000.md: Remove warning.
+	(builtin_setjmp_receiver): Likewise.
+	* config/darwin.c (update_stubs): Slightly improve terrible hack
+	with identifiers.  Add comment pointing out problems with it.
+	(update_non_lazy_ptrs): Likewise.
+
 2003-01-21  Ulrich Weigand  <uweigand@de.ibm.com>
 
 	* dwarf2out (output_file_names): Don't crash if called
Index: config/darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v
retrieving revision 1.32
diff -u -p -u -p -r1.32 darwin.c
--- config/darwin.c	10 Jan 2003 02:22:07 -0000	1.32
+++ config/darwin.c	22 Jan 2003 01:08:54 -0000
@@ -1,5 +1,5 @@
 /* Functions for generic Darwin as target machine for GNU C compiler.
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Apple Computer Inc.
 
@@ -1016,7 +1016,9 @@ update_non_lazy_ptrs (name)
 	  name2 = darwin_strip_name_encoding (sym_name);
 	  if (strcmp (name1, name2) == 0)
 	    {
-	      IDENTIFIER_POINTER (TREE_VALUE (temp)) = name;
+	      /* FIXME: This breaks the identifier hash table.  */
+	      IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str 
+		= (unsigned char *) name;
 	      break;
 	    }
 	}
@@ -1080,7 +1082,9 @@ update_stubs (name)
 	  name2 = darwin_strip_name_encoding (sym_name);
 	  if (strcmp (name1, name2) == 0)
 	    {
-	      IDENTIFIER_POINTER (TREE_VALUE (temp)) = name;
+	      /* FIXME: This breaks the identifier hash table.  */
+	      IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str 
+		= (unsigned char *) name;
 	      break;
 	    }
 	}
@@ -1097,7 +1101,7 @@ machopic_select_section (exp, reloc, ali
     {
       if (flag_writable_strings)
 	data_section ();
-      else if (TREE_STRING_LENGTH (exp) !=
+      else if ((size_t) TREE_STRING_LENGTH (exp) !=
 	       strlen (TREE_STRING_POINTER (exp)) + 1)
 	readonly_data_section ();
       else
Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.230
diff -u -p -u -p -r1.230 rs6000.md
--- config/rs6000/rs6000.md	18 Jan 2003 03:02:19 -0000	1.230
+++ config/rs6000/rs6000.md	22 Jan 2003 01:08:55 -0000
@@ -1,6 +1,6 @@
 ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler
-;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 
-;; 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+;; 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 ;; This file is part of GNU CC.
@@ -8899,7 +8899,9 @@
 {
   long l[4];
   REAL_VALUE_TYPE rv;
+#if HOST_BITS_PER_WIDE_INT >= 64
   HOST_WIDE_INT val;
+#endif
 
   REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]);
   REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, l);
@@ -10581,7 +10583,7 @@
 #if TARGET_MACHO
   if (DEFAULT_ABI == ABI_DARWIN)
     {
-      char *picbase = machopic_function_base_name ();
+      const char *picbase = machopic_function_base_name ();
       rtx picrtx = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (picbase, -1));
       rtx picreg = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
       rtx tmplabrtx;
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]