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]

PATCH: Fix Tru64 UNIX bootstrap


As of rev 147380, mainline didn't bootstrap on alpha-dec-osf[45]:

gcc/config/alpha/alpha.c: In function 'alpha_initialize_trampoline':
gcc/config/alpha/alpha.c:5500: error: enum conversion when passing argument 2 of 'emit_library_call' is invalid in C++
gcc/rtl.h:2267: note: expected 'enum libcall_type' but argument is of type 'int'

gcc/mips-tfile.c: In function 'add_ext_symbol':
gcc/mips-tfile.c:1942: warning: enum conversion when passing argument 1 of 'sc_to_string' is invalid in C++
gcc/mips-tfile.c:1553: note: expected 'sc_t' but argument is of type 'unsigned char:5'
gcc/mips-tfile.c:1943: warning: enum conversion when passing argument 1 of 'st_to_string' is invalid in C++
gcc/mips-tfile.c:1552: note: expected 'st_t' but argument is of type 'unsigned char:6'
gcc/mips-tfile.c: In function 'parse_def':
gcc/mips-tfile.c:2858: warning: cast discards qualifiers from pointer target type
gcc/mips-tfile.c:2915: warning: cast discards qualifiers from pointer target type
gcc/mips-tfile.c:2989: warning: cast discards qualifiers from pointer target type
gcc/mips-tfile.c: In function 'mark_stabs':
gcc/mips-tfile.c:3478: warning: enum conversion when passing argument 3 of 'add_local_symbol' is invalid in C++
gcc/mips-tfile.c:1754: note: expected 'st_t' but argument is of type 'int'
gcc/mips-tfile.c:3478: warning: enum conversion when passing argument 4 of 'add_local_symbol' is invalid in C++
gcc/mips-tfile.c:1754: note: expected 'sc_t' but argument is of type 'int'
gcc/mips-tfile.c: In function 'parse_stabs_common':
gcc/mips-tfile.c:3671: warning: enum conversion in assignment is invalid in C++
gcc/mips-tfile.c:3672: warning: enum conversion in assignment is invalid in C++

gcc/mips-tdump.c: In function 'print_file_desc':
gcc/mips-tdump.c:1119: error: enum conversion when passing argument 1 of 'glevel_to_string' is invalid in C++
gcc/mips-tdump.c:408: note: expected 'glevel_t' but argument is of type 'unsigned char:2'

The following trivial patch fixes this and allows the bootstrap to
continue; currently the testsuite is running.

I think it qualifies as obvious, and since mips-t* are only used by the
alpha-dec-osf port, I can check those in on my own.

I'll check it in within a day unless someone objects.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Tue May 12 11:03:03 2009  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/alpha/alpha.c (alpha_initialize_trampoline): Change 0 to
	LCT_NORMAL in function call.
	* mips-tdump.c (print_file_desc): Add cast to enum type.
	* mips-tfile.c (add_ext_symbol): Add casts to enum types.
	(mark_stabs): Add casts to enum types.
	(parse_stabs_common): Add casts to enum types.
	
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 147380)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -5497,7 +5497,7 @@ alpha_initialize_trampoline (rtx tramp, 
 
 #ifdef ENABLE_EXECUTE_STACK
   emit_library_call (init_one_libfunc ("__enable_execute_stack"),
-		     0, VOIDmode, 1, tramp, Pmode);
+		     LCT_NORMAL, VOIDmode, 1, tramp, Pmode);
 #endif
 
   if (jmpofs >= 0)
Index: gcc/mips-tdump.c
===================================================================
--- gcc/mips-tdump.c	(revision 147380)
+++ gcc/mips-tdump.c	(working copy)
@@ -1116,7 +1116,7 @@ print_file_desc (FDR *fdp, int number)
 	  (fdp->fBigendian) ? "BIG" : "LITTLE");
 
   printf ("    Debug level = %-10s Language    = %s\n",
-	  glevel_to_string (fdp->glevel),
+	  glevel_to_string ((glevel_t) fdp->glevel),
 	  lang_to_string((lang_t) fdp->lang));
 
   printf ("    Adr         = 0x%08lx\n\n", (long) fdp->adr);
Index: gcc/mips-tfile.c
===================================================================
--- gcc/mips-tfile.c	(revision 147380)
+++ gcc/mips-tfile.c	(working copy)
@@ -1939,8 +1939,8 @@ add_ext_symbol (EXTR *esym, int ifd)
   if (debug > 1)
     {
       long value = esym->asym.value;
-      const char *sc_str = sc_to_string (esym->asym.sc);
-      const char *st_str = st_to_string (esym->asym.st);
+      const char *sc_str = sc_to_string ((sc_t) esym->asym.sc);
+      const char *st_str = st_to_string ((st_t) esym->asym.st);
 
       fprintf (stderr,
 	       "\tesym\tv= %10ld, ifd= %2d, sc= %-12s",
@@ -3475,7 +3475,8 @@ mark_stabs (const char *start ATTRIBUTE_
       stabs_seen = 1;
       (void) add_local_symbol (stabs_symbol,
 			       stabs_symbol + sizeof (stabs_symbol),
-			       stNil, scInfo, -1, MIPS_MARK_STAB (0));
+			       (st_t) stNil, (sc_t) scInfo, -1,
+			       MIPS_MARK_STAB (0));
 
     }
 }
@@ -3668,8 +3669,8 @@ parse_stabs_common (const char *string_s
 	  /* Traditionally, N_LBRAC and N_RBRAC are *not* relocated.  */
 	  if (code == (int) N_LBRAC || code == (int) N_RBRAC)
 	    {
-	      sc = scNil;
-	      st = stNil;
+	      sc = (sc_t) scNil;
+	      st = (st_t) stNil;
 	    }
 	  else
 	    {


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