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]

[3.3 PATCH] Use K&R style functions for integer_nozerop


Many thanks to Kaveh for pointing out a problem with my recent
backport of the function integer_nonzerop to the gcc-3_3-branch.
Unfortunately, I'd forgotten that, unlike mainline, gcc 3.3.3 still
requires use of the PARAMS macro with function prototypes and K&R
style function declarations.


The following patch has been tested against the gcc-3_3-branch on
i686-pc-linux-gnu with a full "make bootstrap", all languages except
treelang, and regression tested with no new failures.

Ok for the 3.3 branch?


2004-01-02  Roger Sayle  <roger@eyesopen.com>

	* tree.h (integer_nonzerop): Use PARAMS macro with prototype.
	* tree.c (integer_nonzerop): Use K&R style function declaration.


Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.367.2.8
diff -c -3 -p -r1.367.2.8 tree.h
*** tree.h	1 Jan 2004 04:44:53 -0000	1.367.2.8
--- tree.h	3 Jan 2004 00:31:29 -0000
***************
*** 1,6 ****
  /* Front-end tree definitions for GNU compiler.
     Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
!    2001, 2002 Free Software Foundation, Inc.

  This file is part of GCC.

--- 1,6 ----
  /* Front-end tree definitions for GNU compiler.
     Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
!    2001, 2002, 2003, 2004 Free Software Foundation, Inc.

  This file is part of GCC.

*************** extern int integer_pow2p		PARAMS ((tree)
*** 2640,2646 ****
  /* integer_nonzerop (tree x) is nonzero if X is an integer constant
     with a nonzero value.  */

! extern int integer_nonzerop (tree);

  /* staticp (tree x) is nonzero if X is a reference to data allocated
     at a fixed address in memory.  */
--- 2640,2646 ----
  /* integer_nonzerop (tree x) is nonzero if X is an integer constant
     with a nonzero value.  */

! extern int integer_nonzerop		PARAMS ((tree));

  /* staticp (tree x) is nonzero if X is a reference to data allocated
     at a fixed address in memory.  */
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.282.2.4
diff -c -3 -p -r1.282.2.4 tree.c
*** tree.c	1 Jan 2004 04:44:51 -0000	1.282.2.4
--- tree.c	3 Jan 2004 00:31:30 -0000
***************
*** 1,6 ****
  /* Language-independent node constructors for parse phase of GNU compiler.
     Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002 Free Software Foundation, Inc.

  This file is part of GCC.

--- 1,6 ----
  /* Language-independent node constructors for parse phase of GNU compiler.
     Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.

  This file is part of GCC.

*************** integer_pow2p (expr)
*** 727,733 ****
     complex constant other than zero.  */

  int
! integer_nonzerop (tree expr)
  {
    STRIP_NOPS (expr);

--- 727,734 ----
     complex constant other than zero.  */

  int
! integer_nonzerop (expr)
!      tree expr;
  {
    STRIP_NOPS (expr);


Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


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