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]

Committed: i386.c ix86_expand_unary_operator made void


Spotted as a "control reaches end of non-void function"-warning
while compiling i386.c.

This was rather obvious too.  It really must be that
ix86_expand_unary_operator should be void.  It never returns a
value, and all callers (in i386.md) treat it as void.

At first I thought the (updated) comment meant it was *intended*
to return a value.  But then I saw the same confusing comment in
front of ix86_expand_binary_operator (which is void and used in
a similar manner), so then it was obvious that it is just
leftovers from when ix86_..._operator_ok was split out or
something like that.
 It seems it predates egcs; a simple search indicates
ix86_expand_unary_operator and ix86_unary_operator_ok are
prehistoric.

(Copyright-date of i386.c also changed, more brownie points for me.)

brgds, H-P

Mon Jan  3 02:54:40 2000  Hans-Peter Nilsson  <hp@bitrange.com>

	* config/i386/i386.c (ix86_expand_unary_operator): Function
	definition made void.
	(ix86_expand_binary_operator): Update outdated preceding comment.
	* config/i386/i386-protos.h (ix86_expand_unary_operator): Update
	prototype.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.116
diff -p -c -r1.116 i386.c
*** i386.c	2000/01/03 01:13:16	1.116
--- i386.c	2000/01/03 01:39:42
*************** ix86_expand_move (mode, operands)
*** 3716,3723 ****
  
  /* Attempt to expand a binary operator.  Make the expansion closer to the
     actual machine, then just general_operand, which will allow 3 separate
!    memory references (one output, two input) in a single insn.  Return
!    whether the insn fails, or succeeds.  */
  
  void
  ix86_expand_binary_operator (code, mode, operands)
--- 3716,3722 ----
  
  /* Attempt to expand a binary operator.  Make the expansion closer to the
     actual machine, then just general_operand, which will allow 3 separate
!    memory references (one output, two input) in a single insn.  */
  
  void
  ix86_expand_binary_operator (code, mode, operands)
*************** ix86_binary_operator_ok (code, mode, ope
*** 3837,3846 ****
  
  /* Attempt to expand a unary operator.  Make the expansion closer to the
     actual machine, then just general_operand, which will allow 2 separate
!    memory references (one output, one input) in a single insn.  Return
!    whether the insn fails, or succeeds.  */
  
! int
  ix86_expand_unary_operator (code, mode, operands)
       enum rtx_code code;
       enum machine_mode mode;
--- 3836,3844 ----
  
  /* Attempt to expand a unary operator.  Make the expansion closer to the
     actual machine, then just general_operand, which will allow 2 separate
!    memory references (one output, one input) in a single insn.  */
  
! void
  ix86_expand_unary_operator (code, mode, operands)
       enum rtx_code code;
       enum machine_mode mode;
Index: i386-protos.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386-protos.h,v
retrieving revision 1.6
diff -p -c -r1.6 i386-protos.h
*** i386-protos.h	1999/12/17 00:45:03	1.6
--- i386-protos.h	2000/01/03 01:39:42
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler for IA-32.
!    Copyright (C) 1988, 92, 94-98, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler for IA-32.
!    Copyright (C) 1988, 92, 94-99, 2000 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** extern void ix86_expand_binary_operator 
*** 86,93 ****
  					       enum machine_mode, rtx[]));
  extern int ix86_binary_operator_ok PROTO((enum rtx_code, enum machine_mode,
  					  rtx[]));
! extern int ix86_expand_unary_operator PROTO((enum rtx_code, enum machine_mode,
! 					     rtx[]));
  extern int ix86_unary_operator_ok PROTO((enum rtx_code, enum machine_mode,
  					 rtx[]));
  extern void ix86_expand_branch PROTO((enum rtx_code, int, rtx));
--- 86,93 ----
  					       enum machine_mode, rtx[]));
  extern int ix86_binary_operator_ok PROTO((enum rtx_code, enum machine_mode,
  					  rtx[]));
! extern void ix86_expand_unary_operator PROTO((enum rtx_code, enum machine_mode,
! 					      rtx[]));
  extern int ix86_unary_operator_ok PROTO((enum rtx_code, enum machine_mode,
  					 rtx[]));
  extern void ix86_expand_branch PROTO((enum rtx_code, int, rtx));


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