public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
@ 1998-03-25 14:00 Kaveh R. Ghazi
  1998-03-25 17:22 ` Michael Meissner
  0 siblings, 1 reply; 8+ messages in thread
From: Kaveh R. Ghazi @ 1998-03-25 14:00 UTC (permalink / raw)
  To: dje, meissner; +Cc: egcs, law, wilson

 > From: Michael Meissner <meissner@cygnus.com>
 > 
 > David Edelsohn writes:
 > | 	I cannot comment on the correctness for SVR4 functions affected
 > | and was leaving that to Mike.
 > 
 > I obviously lost the patch in the swamp I call an inbox.  When was it
 > sent, or can you send it again to me.

	You can find it at http://www.cygnus.com/ml/egcs/1998-Mar/0679.html

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
  1998-03-25 14:00 egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes Kaveh R. Ghazi
@ 1998-03-25 17:22 ` Michael Meissner
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Meissner @ 1998-03-25 17:22 UTC (permalink / raw)
  To: ghazi; +Cc: dje, meissner, egcs, law, wilson

Kaveh R. Ghazi writes:
|  > From: Michael Meissner <meissner@cygnus.com>
|  > 
|  > David Edelsohn writes:
|  > | 	I cannot comment on the correctness for SVR4 functions affected
|  > | and was leaving that to Mike.
|  > 
|  > I obviously lost the patch in the swamp I call an inbox.  When was it
|  > sent, or can you send it again to me.
| 
| 	You can find it at http://www.cygnus.com/ml/egcs/1998-Mar/0679.html

The part of rs6000.h that adds the declaration for:

extern enum direction function_arg_padding ();

is wrong, since it depends on the compiler supporting unknown tags to
enums, which is a GCC extension.  I have fixed this by making the
function an integer function.  I also included system.h as Jeff
pointed out and committed the fixes (including collect2.c and
dbxout.c).

Here is the patch that I committed:

Wed Mar 25 16:09:01 1998  Michael Meissner  <meissner@cygnus.com>

	* rs6000.h (FUNCTION_ARG_PADDING): Cast result to be enum
	direction.
	(function_arg_padding): Declare.

	* rs6000.c: Include system.h.
	(function_arg_padding): Change return type to int, cast enum's to
	int.

	(From Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>)
	* collect2.c (scan_prog_file): Add explicit braces to avoid
	ambiguous `else'.
 
	* dbxout.c (dbxout_type_fields): Add braces around empty body in
	an if-statement.
	(dbxout_type): Likewise.
 
	* rs6000.c (rs6000_override_options): Change type of `i', `j' and
	`ptt_size' from int to size_t.
	(rs6000_file_start): Likewise for `i'.
	(rs6000_replace_regno): Add default case in enumeration switch.
	(output_epilog): Remove unused variable `i'.
	(rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
	and `reg2'.
 
	* rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
	initializer.
	(get_issue_rate, non_logical_cint_operand): Add prototype.
	(rs6000_output_load_toc_table): Ditto.
 
	* rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
	`else'.
 
*** gcc/config/rs6000/rs6000.h.~1~	Wed Mar 25 16:07:46 1998
--- gcc/config/rs6000/rs6000.h	Wed Mar 25 14:40:06 1998
*************** typedef struct rs6000_args
*** 1468,1474 ****
     padding.  */
  
  #define FUNCTION_ARG_PADDING(MODE, TYPE) \
!   function_arg_padding (MODE, TYPE)
  
  /* If defined, a C expression that gives the alignment boundary, in bits,
     of an argument with the specified mode and type.  If it is not defined,
--- 1468,1474 ----
     padding.  */
  
  #define FUNCTION_ARG_PADDING(MODE, TYPE) \
!   (enum direction) function_arg_padding (MODE, TYPE)
  
  /* If defined, a C expression that gives the alignment boundary, in bits,
     of an argument with the specified mode and type.  If it is not defined,
*************** extern char rs6000_reg_names[][8];	/* re
*** 2755,2780 ****
  /* Table of additional register names to use in user input.  */
  
  #define ADDITIONAL_REGISTER_NAMES \
!  {"r0",    0, "r1",    1, "r2",    2, "r3",    3,	\
!   "r4",    4, "r5",    5, "r6",    6, "r7",    7,	\
!   "r8",    8, "r9",    9, "r10",  10, "r11",  11,	\
!   "r12",  12, "r13",  13, "r14",  14, "r15",  15,	\
!   "r16",  16, "r17",  17, "r18",  18, "r19",  19,	\
!   "r20",  20, "r21",  21, "r22",  22, "r23",  23,	\
!   "r24",  24, "r25",  25, "r26",  26, "r27",  27,	\
!   "r28",  28, "r29",  29, "r30",  30, "r31",  31,	\
!   "fr0",  32, "fr1",  33, "fr2",  34, "fr3",  35,	\
!   "fr4",  36, "fr5",  37, "fr6",  38, "fr7",  39,	\
!   "fr8",  40, "fr9",  41, "fr10", 42, "fr11", 43,	\
!   "fr12", 44, "fr13", 45, "fr14", 46, "fr15", 47,	\
!   "fr16", 48, "fr17", 49, "fr18", 50, "fr19", 51,	\
!   "fr20", 52, "fr21", 53, "fr22", 54, "fr23", 55,	\
!   "fr24", 56, "fr25", 57, "fr26", 58, "fr27", 59,	\
!   "fr28", 60, "fr29", 61, "fr30", 62, "fr31", 63,	\
!   /* no additional names for: mq, lr, ctr, ap */	\
!   "cr0",  68, "cr1",  69, "cr2",  70, "cr3",  71,	\
!   "cr4",  72, "cr5",  73, "cr6",  74, "cr7",  75,	\
!   "cc",   68, "sp",    1, "toc",   2 }
  
  /* How to renumber registers for dbx and gdb.  */
  
--- 2755,2780 ----
  /* Table of additional register names to use in user input.  */
  
  #define ADDITIONAL_REGISTER_NAMES \
!  {{"r0",    0}, {"r1",    1}, {"r2",    2}, {"r3",    3},	\
!   {"r4",    4}, {"r5",    5}, {"r6",    6}, {"r7",    7},	\
!   {"r8",    8}, {"r9",    9}, {"r10",  10}, {"r11",  11},	\
!   {"r12",  12}, {"r13",  13}, {"r14",  14}, {"r15",  15},	\
!   {"r16",  16}, {"r17",  17}, {"r18",  18}, {"r19",  19},	\
!   {"r20",  20}, {"r21",  21}, {"r22",  22}, {"r23",  23},	\
!   {"r24",  24}, {"r25",  25}, {"r26",  26}, {"r27",  27},	\
!   {"r28",  28}, {"r29",  29}, {"r30",  30}, {"r31",  31},	\
!   {"fr0",  32}, {"fr1",  33}, {"fr2",  34}, {"fr3",  35},	\
!   {"fr4",  36}, {"fr5",  37}, {"fr6",  38}, {"fr7",  39},	\
!   {"fr8",  40}, {"fr9",  41}, {"fr10", 42}, {"fr11", 43},	\
!   {"fr12", 44}, {"fr13", 45}, {"fr14", 46}, {"fr15", 47},	\
!   {"fr16", 48}, {"fr17", 49}, {"fr18", 50}, {"fr19", 51},	\
!   {"fr20", 52}, {"fr21", 53}, {"fr22", 54}, {"fr23", 55},	\
!   {"fr24", 56}, {"fr25", 57}, {"fr26", 58}, {"fr27", 59},	\
!   {"fr28", 60}, {"fr29", 61}, {"fr30", 62}, {"fr31", 63},	\
!   /* no additional names for: mq, lr, ctr, ap */		\
!   {"cr0",  68}, {"cr1",  69}, {"cr2",  70}, {"cr3",  71},	\
!   {"cr4",  72}, {"cr5",  73}, {"cr6",  74}, {"cr7",  75},	\
!   {"cc",   68}, {"sp",    1}, {"toc",   2} }
  
  /* How to renumber registers for dbx and gdb.  */
  
*************** extern struct rtx_def *rs6000_float_cons
*** 3101,3106 ****
--- 3101,3107 ----
  extern struct rtx_def *rs6000_immed_double_const ();
  extern struct rtx_def *rs6000_got_register ();
  extern int direct_return ();
+ extern int get_issue_rate ();
  extern int any_operand ();
  extern int short_cint_operand ();
  extern int u_short_cint_operand ();
*************** extern int offsettable_addr_operand ();
*** 3120,3125 ****
--- 3121,3127 ----
  extern int mem_or_easy_const_operand ();
  extern int add_operand ();
  extern int non_add_cint_operand ();
+ extern int non_logical_cint_operand ();
  extern int logical_operand ();
  extern int non_logical_operand ();
  extern int mask_constant ();
*************** extern int rs6000_adjust_cost ();
*** 3175,3186 ****
--- 3177,3190 ----
  extern void rs6000_trampoline_template ();
  extern int rs6000_trampoline_size ();
  extern void rs6000_initialize_trampoline ();
+ extern void rs6000_output_load_toc_table ();
  extern int rs6000_comp_type_attributes ();
  extern int rs6000_valid_decl_attribute_p ();
  extern int rs6000_valid_type_attribute_p ();
  extern void rs6000_set_default_type_attributes ();
  extern struct rtx_def *rs6000_dll_import_ref ();
  extern struct rtx_def *rs6000_longcall_ref ();
+ extern int function_arg_padding ();
  
  /* See nonlocal_goto_receiver for when this must be set.  */
  
*** gcc/config/rs6000/rs6000.c.~1~	Wed Mar 25 16:07:42 1998
--- gcc/config/rs6000/rs6000.c	Wed Mar 25 14:42:33 1998
*************** Boston, MA 02111-1307, USA.  */
*** 22,27 ****
--- 22,28 ----
  #include <stdio.h>
  #include <ctype.h>
  #include "config.h"
+ #include "system.h"
  #include "rtl.h"
  #include "regs.h"
  #include "hard-reg-set.h"
*************** void
*** 157,163 ****
  rs6000_override_options (default_cpu)
       char *default_cpu;
  {
!   int i, j;
    struct rs6000_cpu_select *ptr;
  
    /* Simplify the entries below by making a mask for any POWER
--- 158,164 ----
  rs6000_override_options (default_cpu)
       char *default_cpu;
  {
!   size_t i, j;
    struct rs6000_cpu_select *ptr;
  
    /* Simplify the entries below by making a mask for any POWER
*************** rs6000_override_options (default_cpu)
*** 241,247 ****
  	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
  	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}};
  
!   int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
  
    int multiple = TARGET_MULTIPLE;	/* save current -mmultiple/-mno-multiple status */
    int string   = TARGET_STRING;		/* save current -mstring/-mno-string status */
--- 242,248 ----
  	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
  	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}};
  
!   size_t ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
  
    int multiple = TARGET_MULTIPLE;	/* save current -mmultiple/-mno-multiple status */
    int string   = TARGET_STRING;		/* save current -mstring/-mno-string status */
*************** rs6000_file_start (file, default_cpu)
*** 337,343 ****
       FILE *file;
       char *default_cpu;
  {
!   int i;
    char buffer[80];
    char *start = buffer;
    struct rs6000_cpu_select *ptr;
--- 338,344 ----
       FILE *file;
       char *default_cpu;
  {
!   size_t i;
    char buffer[80];
    char *start = buffer;
    struct rs6000_cpu_select *ptr;
*************** init_cumulative_args (cum, fntype, libna
*** 1187,1208 ****
     For the AIX ABI structs are always stored left shifted in their
     argument slot.  */
  
! enum direction
  function_arg_padding (mode, type)
       enum machine_mode mode;
       tree type;
  {
    if (type != 0 && AGGREGATE_TYPE_P (type))
!     return upward;
  
    /* This is the default definition.  */
    return (! BYTES_BIG_ENDIAN
!           ? upward
            : ((mode == BLKmode
                ? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
                   && int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
                : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
!              ? downward : upward));
  }
  
  /* If defined, a C expression that gives the alignment boundary, in bits,
--- 1188,1209 ----
     For the AIX ABI structs are always stored left shifted in their
     argument slot.  */
  
! int
  function_arg_padding (mode, type)
       enum machine_mode mode;
       tree type;
  {
    if (type != 0 && AGGREGATE_TYPE_P (type))
!     return (int)upward;
  
    /* This is the default definition.  */
    return (! BYTES_BIG_ENDIAN
!           ? (int)upward
            : ((mode == BLKmode
                ? (type && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
                   && int_size_in_bytes (type) < (PARM_BOUNDARY / BITS_PER_UNIT))
                : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)
!              ? (int)downward : (int)upward));
  }
  
  /* If defined, a C expression that gives the alignment boundary, in bits,
*************** rs6000_replace_regno (x, from, reg)
*** 2221,2226 ****
--- 2222,2230 ----
  	}
  
        return x;
+ 
+     default:
+       break;
      }
  
    fmt = GET_RTX_FORMAT (GET_CODE (x));
*************** output_epilog (file, size)
*** 3875,3881 ****
    rtx insn = get_last_insn ();
    int sp_reg = 1;
    int sp_offset = 0;
-   int i;
  
    /* If the last insn was a BARRIER, we don't have to write anything except
       the trace table.  */
--- 3879,3884 ----
*************** rs6000_longcall_ref (call_ref)
*** 4946,4954 ****
       rtx call_ref;
  {
    char *call_name;
-   int len;
-   char *p;
-   rtx reg1, reg2;
    tree node;
  
    if (GET_CODE (call_ref) != SYMBOL_REF)
--- 4949,4954 ----
*** gcc/config/rs6000/rs6000.md.~1~	Wed Mar 25 16:07:49 1998
--- gcc/config/rs6000/rs6000.md	Wed Mar 25 14:39:09 1998
***************
*** 1602,1618 ****
    rtx label = 0;
  
    if (! TARGET_POWER)
!     if (! TARGET_POWERPC)
!       {
! 	emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
! 	emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
! 	emit_insn (gen_divus_call ());
! 	emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
! 	emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
! 	DONE;
!       }
!     else
!       FAIL;
  
    if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0)
      {
--- 1602,1620 ----
    rtx label = 0;
  
    if (! TARGET_POWER)
!     {
!       if (! TARGET_POWERPC)
!         {
! 	  emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
! 	  emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
! 	  emit_insn (gen_divus_call ());
! 	  emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
! 	  emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
! 	  DONE;
!         }
!       else
!         FAIL;
!     }
  
    if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0)
      {

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
  1998-03-27 15:18 Kaveh R. Ghazi
@ 1998-03-31  0:46 ` Jeffrey A Law
  0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1998-03-31  0:46 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: meissner, egcs

  In message < 199803261631.LAA09871@caip.rutgers.edu >you write:

  > 	One thing I noticed is that in adding system.h, you left in some
  > OS headers which duplicate stuff brought in by system.h.  This patch
  > fixes it, would you please consider it too?
I took care of this :-)
jeff

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
@ 1998-03-27 15:18 Kaveh R. Ghazi
  1998-03-31  0:46 ` Jeffrey A Law
  0 siblings, 1 reply; 8+ messages in thread
From: Kaveh R. Ghazi @ 1998-03-27 15:18 UTC (permalink / raw)
  To: meissner; +Cc: egcs, law

 > From: Jeffrey A Law <law@hurl.cygnus.com>
 > 
 > Don't you need to make sure system.h is included in rs6000.c so that
 > you get size_t via one of the standard system include files?

	Well, it turns out that on AIX4, stdio.h declares size_t.  (I of
course did test the patch to make sure it bootstrapped) but you're right
that including system.h is safer. 


 > From: Michael Meissner <meissner@cygnus.com>
 > 
 > The part of rs6000.h that adds the declaration for:
 >  
 > extern enum direction function_arg_padding ();
 >  
 > is wrong, since it depends on the compiler supporting unknown tags to
 > enums, which is a GCC extension.  I have fixed this by making the
 > function an integer function.  I also included system.h as Jeff
 > pointed out and committed the fixes (including collect2.c and
 > dbxout.c).

	Hmm, when I did the bootstrap test I used cc for stage1, so
maybe AIX4 cc supports it too? But in any case, your solution makes for
more portable code.  So thanks for making the corrections and for
commiting the patch.  :-)

	One thing I noticed is that in adding system.h, you left in some
OS headers which duplicate stuff brought in by system.h.  This patch
fixes it, would you please consider it too?

		Thanks,
		--Kaveh

--- rs6000.c~	Thu Mar 26 11:27:30 1998
+++ rs6000.c	Thu Mar 26 11:27:55 1998
@@ -19,8 +19,6 @@
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#include <stdio.h>
-#include <ctype.h>
 #include "config.h"
 #include "system.h"
 #include "rtl.h"


--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
  1998-03-24 10:24   ` David Edelsohn
@ 1998-03-25 17:05     ` Michael Meissner
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Meissner @ 1998-03-25 17:05 UTC (permalink / raw)
  To: dje; +Cc: ghazi, law, egcs, wilson, meissner

David Edelsohn writes:
| 	The patch to fix various rs6000 warnings looks fine to me on the
| AIX side.  I already had similar changes for some of the unused variable
| warnings, but had not installed them.  I always am a little worried about
| adding default cases to switch statements.
| 
| >>>>> Jeffrey A Law writes:
| 
| Jeff> In message < 199803191533.KAA22672@caip.rutgers.edu >you write:
| 
| Jeff> It looks fine to me, though I'd like to give Michael Meissner and/or
| Jeff> David Edelsohn a little longer to voice opinions on the rs6000
| Jeff> changes (say Thursday noon as a cutoff)?
| 
| 	I cannot comment on the correctness for SVR4 functions affected
| and was leaving that to Mike.

I obviously lost the patch in the swamp I call an inbox.  When was it
sent, or can you send it again to me.

| David

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
  1998-03-23 22:59 ` Jeffrey A Law
@ 1998-03-24 10:24   ` David Edelsohn
  1998-03-25 17:05     ` Michael Meissner
  0 siblings, 1 reply; 8+ messages in thread
From: David Edelsohn @ 1998-03-24 10:24 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: Jeffrey Law, egcs, wilson, Michael Meissner

	The patch to fix various rs6000 warnings looks fine to me on the
AIX side.  I already had similar changes for some of the unused variable
warnings, but had not installed them.  I always am a little worried about
adding default cases to switch statements.

>>>>> Jeffrey A Law writes:

Jeff> In message < 199803191533.KAA22672@caip.rutgers.edu >you write:

Jeff> It looks fine to me, though I'd like to give Michael Meissner and/or
Jeff> David Edelsohn a little longer to voice opinions on the rs6000
Jeff> changes (say Thursday noon as a cutoff)?

	I cannot comment on the correctness for SVR4 functions affected
and was leaving that to Mike.

David

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

* Re: egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
  1998-03-19 21:47 Kaveh R. Ghazi
@ 1998-03-23 22:59 ` Jeffrey A Law
  1998-03-24 10:24   ` David Edelsohn
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey A Law @ 1998-03-23 22:59 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: egcs, wilson

  In message < 199803191533.KAA22672@caip.rutgers.edu >you write:
  > 	Here is yet another warning patch (YAWP).  This one fixes 129
  > warnings on powerpc-ibm-aix4.1.4.0.  Is it okay to install?
  > 
  > 		Thanks,
  > 		--Kaveh
  > 
  > 
  > Wed Mar 18 12:08:45 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
  >  
  >         * collect2.c (scan_prog_file): Add explicit braces to avoid
  >         ambiguous `else'.
  >  
  >         * dbxout.c (dbxout_type_fields): Add braces around empty body in
  >         an if-statement.
  >         (dbxout_type): Likewise.
  >  
  >         * rs6000.c (rs6000_override_options): Change type of `i', `j' and
  >         `ptt_size' from int to size_t.
  >         (rs6000_file_start): Likewise for `i'.
  >         (rs6000_replace_regno): Add default case in enumeration switch.
  >         (output_epilog): Remove unused variable `i'.
  >         (rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
  >         and `reg2'.
  >  
  >         * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
  >         initializer.
  >         (get_issue_rate, non_logical_cint_operand,
  >         rs6000_output_load_toc_table, function_arg_padding): Add prototype.
  >  
  >         * rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
  >         `else'.
Don't you need to make sure system.h is included in rs6000.c so that
you get size_t via one of the standard system include files?

It looks fine to me, though I'd like to give Michael Meissner and/or
David Edelsohn a little longer to voice opinions on the rs6000
changes (say Thursday noon as a cutoff)?

You can go ahead and install the collect & dbxout changes now or
wait and install everything at once.



jeff

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

* egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes ...
@ 1998-03-19 21:47 Kaveh R. Ghazi
  1998-03-23 22:59 ` Jeffrey A Law
  0 siblings, 1 reply; 8+ messages in thread
From: Kaveh R. Ghazi @ 1998-03-19 21:47 UTC (permalink / raw)
  To: egcs; +Cc: ghazi

	Here is yet another warning patch (YAWP).  This one fixes 129
warnings on powerpc-ibm-aix4.1.4.0.  Is it okay to install?

		Thanks,
		--Kaveh


Wed Mar 18 12:08:45 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * collect2.c (scan_prog_file): Add explicit braces to avoid
        ambiguous `else'.
 
        * dbxout.c (dbxout_type_fields): Add braces around empty body in
        an if-statement.
        (dbxout_type): Likewise.
 
        * rs6000.c (rs6000_override_options): Change type of `i', `j' and
        `ptt_size' from int to size_t.
        (rs6000_file_start): Likewise for `i'.
        (rs6000_replace_regno): Add default case in enumeration switch.
        (output_epilog): Remove unused variable `i'.
        (rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
        and `reg2'.
 
        * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
        initializer.
        (get_issue_rate, non_logical_cint_operand,
        rs6000_output_load_toc_table, function_arg_padding): Add prototype.
 
        * rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
        `else'.
 

diff -rup /tmp/gcc-testing/egcs-980315/gcc/collect2.c egcs-980315/gcc/collect2.c
--- /tmp/gcc-testing/egcs-980315/gcc/collect2.c	Mon Feb 23 03:58:16 1998
+++ egcs-980315/gcc/collect2.c	Wed Mar 18 10:36:40 1998
@@ -2894,12 +2894,14 @@ scan_prog_file (prog_name, which_pass)
 			     to explicitly export all global symbols or add
 			     them to import list.  */
 			  if (shared_obj) 
-			    if (which_pass == PASS_OBJ && (! export_flag))
-			      add_to_list (&exports, name);
-			    else if (! is_shared && which_pass == PASS_FIRST
-				     && import_flag
-				     && is_in_list(name, undefined.first))
-			      add_to_list (&imports, name);
+			    {
+			      if (which_pass == PASS_OBJ && (! export_flag))
+				add_to_list (&exports, name);
+			      else if (! is_shared && which_pass == PASS_FIRST
+				       && import_flag
+				       && is_in_list(name, undefined.first))
+				add_to_list (&imports, name);
+			    }
 #endif
 			  continue;
 			}
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.c egcs-980315/gcc/config/rs6000/rs6000.c
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.c	Tue Feb 10 04:05:42 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.c	Wed Mar 18 10:50:31 1998
@@ -157,7 +157,7 @@ void
 rs6000_override_options (default_cpu)
      char *default_cpu;
 {
-  int i, j;
+  size_t i, j;
   struct rs6000_cpu_select *ptr;
 
   /* Simplify the entries below by making a mask for any POWER
@@ -241,7 +241,7 @@ rs6000_override_options (default_cpu)
 	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
 	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64}};
 
-  int ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
+  size_t ptt_size = sizeof (processor_target_table) / sizeof (struct ptt);
 
   int multiple = TARGET_MULTIPLE;	/* save current -mmultiple/-mno-multiple status */
   int string   = TARGET_STRING;		/* save current -mstring/-mno-string status */
@@ -337,7 +337,7 @@ rs6000_file_start (file, default_cpu)
      FILE *file;
      char *default_cpu;
 {
-  int i;
+  size_t i;
   char buffer[80];
   char *start = buffer;
   struct rs6000_cpu_select *ptr;
@@ -2210,6 +2210,9 @@ rs6000_replace_regno (x, from, reg)
 	}
 
       return x;
+
+    default:
+      break;
     }
 
   fmt = GET_RTX_FORMAT (GET_CODE (x));
@@ -3864,7 +3867,6 @@ output_epilog (file, size)
   rtx insn = get_last_insn ();
   int sp_reg = 1;
   int sp_offset = 0;
-  int i;
 
   /* If the last insn was a BARRIER, we don't have to write anything except
      the trace table.  */
@@ -4935,9 +4937,6 @@ rs6000_longcall_ref (call_ref)
      rtx call_ref;
 {
   char *call_name;
-  int len;
-  char *p;
-  rtx reg1, reg2;
   tree node;
 
   if (GET_CODE (call_ref) != SYMBOL_REF)
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.h egcs-980315/gcc/config/rs6000/rs6000.h
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.h	Fri Mar  6 09:45:17 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.h	Wed Mar 18 11:02:32 1998
@@ -2755,26 +2755,26 @@ extern char rs6000_reg_names[][8];	/* re
 /* Table of additional register names to use in user input.  */
 
 #define ADDITIONAL_REGISTER_NAMES \
- {"r0",    0, "r1",    1, "r2",    2, "r3",    3,	\
-  "r4",    4, "r5",    5, "r6",    6, "r7",    7,	\
-  "r8",    8, "r9",    9, "r10",  10, "r11",  11,	\
-  "r12",  12, "r13",  13, "r14",  14, "r15",  15,	\
-  "r16",  16, "r17",  17, "r18",  18, "r19",  19,	\
-  "r20",  20, "r21",  21, "r22",  22, "r23",  23,	\
-  "r24",  24, "r25",  25, "r26",  26, "r27",  27,	\
-  "r28",  28, "r29",  29, "r30",  30, "r31",  31,	\
-  "fr0",  32, "fr1",  33, "fr2",  34, "fr3",  35,	\
-  "fr4",  36, "fr5",  37, "fr6",  38, "fr7",  39,	\
-  "fr8",  40, "fr9",  41, "fr10", 42, "fr11", 43,	\
-  "fr12", 44, "fr13", 45, "fr14", 46, "fr15", 47,	\
-  "fr16", 48, "fr17", 49, "fr18", 50, "fr19", 51,	\
-  "fr20", 52, "fr21", 53, "fr22", 54, "fr23", 55,	\
-  "fr24", 56, "fr25", 57, "fr26", 58, "fr27", 59,	\
-  "fr28", 60, "fr29", 61, "fr30", 62, "fr31", 63,	\
-  /* no additional names for: mq, lr, ctr, ap */	\
-  "cr0",  68, "cr1",  69, "cr2",  70, "cr3",  71,	\
-  "cr4",  72, "cr5",  73, "cr6",  74, "cr7",  75,	\
-  "cc",   68, "sp",    1, "toc",   2 }
+ {{"r0",    0}, {"r1",    1}, {"r2",    2}, {"r3",    3},	\
+  {"r4",    4}, {"r5",    5}, {"r6",    6}, {"r7",    7},	\
+  {"r8",    8}, {"r9",    9}, {"r10",  10}, {"r11",  11},	\
+  {"r12",  12}, {"r13",  13}, {"r14",  14}, {"r15",  15},	\
+  {"r16",  16}, {"r17",  17}, {"r18",  18}, {"r19",  19},	\
+  {"r20",  20}, {"r21",  21}, {"r22",  22}, {"r23",  23},	\
+  {"r24",  24}, {"r25",  25}, {"r26",  26}, {"r27",  27},	\
+  {"r28",  28}, {"r29",  29}, {"r30",  30}, {"r31",  31},	\
+  {"fr0",  32}, {"fr1",  33}, {"fr2",  34}, {"fr3",  35},	\
+  {"fr4",  36}, {"fr5",  37}, {"fr6",  38}, {"fr7",  39},	\
+  {"fr8",  40}, {"fr9",  41}, {"fr10", 42}, {"fr11", 43},	\
+  {"fr12", 44}, {"fr13", 45}, {"fr14", 46}, {"fr15", 47},	\
+  {"fr16", 48}, {"fr17", 49}, {"fr18", 50}, {"fr19", 51},	\
+  {"fr20", 52}, {"fr21", 53}, {"fr22", 54}, {"fr23", 55},	\
+  {"fr24", 56}, {"fr25", 57}, {"fr26", 58}, {"fr27", 59},	\
+  {"fr28", 60}, {"fr29", 61}, {"fr30", 62}, {"fr31", 63},	\
+  /* no additional names for: mq, lr, ctr, ap */		\
+  {"cr0",  68}, {"cr1",  69}, {"cr2",  70}, {"cr3",  71},	\
+  {"cr4",  72}, {"cr5",  73}, {"cr6",  74}, {"cr7",  75},	\
+  {"cc",   68}, {"sp",    1}, {"toc",   2} }
 
 /* How to renumber registers for dbx and gdb.  */
 
@@ -3101,6 +3101,7 @@ extern struct rtx_def *rs6000_float_cons
 extern struct rtx_def *rs6000_immed_double_const ();
 extern struct rtx_def *rs6000_got_register ();
 extern int direct_return ();
+extern int get_issue_rate ();
 extern int any_operand ();
 extern int short_cint_operand ();
 extern int u_short_cint_operand ();
@@ -3120,6 +3121,7 @@ extern int offsettable_addr_operand ();
 extern int mem_or_easy_const_operand ();
 extern int add_operand ();
 extern int non_add_cint_operand ();
+extern int non_logical_cint_operand ();
 extern int logical_operand ();
 extern int non_logical_operand ();
 extern int mask_constant ();
@@ -3175,12 +3177,14 @@ extern int rs6000_adjust_cost ();
 extern void rs6000_trampoline_template ();
 extern int rs6000_trampoline_size ();
 extern void rs6000_initialize_trampoline ();
+extern void rs6000_output_load_toc_table ();
 extern int rs6000_comp_type_attributes ();
 extern int rs6000_valid_decl_attribute_p ();
 extern int rs6000_valid_type_attribute_p ();
 extern void rs6000_set_default_type_attributes ();
 extern struct rtx_def *rs6000_dll_import_ref ();
 extern struct rtx_def *rs6000_longcall_ref ();
+extern enum direction function_arg_padding ();
 
 /* See nonlocal_goto_receiver for when this must be set.  */
 
diff -rup /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.md egcs-980315/gcc/config/rs6000/rs6000.md
--- /tmp/gcc-testing/egcs-980315/gcc/config/rs6000/rs6000.md	Thu Feb 12 12:18:51 1998
+++ egcs-980315/gcc/config/rs6000/rs6000.md	Wed Mar 18 10:38:39 1998
@@ -1602,17 +1602,19 @@
   rtx label = 0;
 
   if (! TARGET_POWER)
-    if (! TARGET_POWERPC)
-      {
-	emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
-	emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
-	emit_insn (gen_divus_call ());
-	emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
-	emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
-	DONE;
-      }
-    else
-      FAIL;
+    {
+      if (! TARGET_POWERPC)
+        {
+	  emit_move_insn (gen_rtx (REG, SImode, 3), operands[1]);
+	  emit_move_insn (gen_rtx (REG, SImode, 4), operands[2]);
+	  emit_insn (gen_divus_call ());
+	  emit_move_insn (operands[0], gen_rtx (REG, SImode, 3));
+	  emit_move_insn (operands[3], gen_rtx (REG, SImode, 4));
+	  DONE;
+        }
+      else
+        FAIL;
+    }
 
   if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) < 0)
     {
diff -rup /tmp/gcc-testing/egcs-980315/gcc/dbxout.c egcs-980315/gcc/dbxout.c
--- /tmp/gcc-testing/egcs-980315/gcc/dbxout.c	Wed Mar 11 18:34:31 1998
+++ egcs-980315/gcc/dbxout.c	Wed Mar 18 10:25:23 1998
@@ -657,7 +657,9 @@ dbxout_type_fields (type)
 	  /* Continue the line if necessary,
 	     but not before the first field.  */
 	  if (tem != TYPE_FIELDS (type))
-	    CONTIN;
+	    {
+	      CONTIN;
+	    }
 
 	  if (use_gnu_debug_info_extensions
 	      && flag_minimal_debug
@@ -1438,7 +1440,9 @@ dbxout_type (type, full, show_arg_types)
 	  fprintf (asmfile, ",");
 	  CHARS (20 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem)));
 	  if (TREE_CHAIN (tem) != 0)
-	    CONTIN;
+	    {
+	      CONTIN;
+	    }
 	}
       putc (';', asmfile);
       CHARS (1);
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.

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

end of thread, other threads:[~1998-03-31  0:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-25 14:00 egcs-980315 powerpc-ibm-aix4.1.4.0 warning fixes Kaveh R. Ghazi
1998-03-25 17:22 ` Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
1998-03-27 15:18 Kaveh R. Ghazi
1998-03-31  0:46 ` Jeffrey A Law
1998-03-19 21:47 Kaveh R. Ghazi
1998-03-23 22:59 ` Jeffrey A Law
1998-03-24 10:24   ` David Edelsohn
1998-03-25 17:05     ` Michael Meissner

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