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]

Minor buglet in c-decl.c


Wed Sep 20 15:39:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* c-decl.c (finish_decl): Add else's to avoid referencing
	TYPE_DOMAIN of an ERROR_MARK.

*** c-decl.c	2000/09/19 07:59:58	1.160
--- c-decl.c	2000/09/20 14:51:07
*************** finish_decl (decl, init, asmspec_tree)
*** 3636,3640 ****
  	error_with_decl (decl, "initializer fails to determine size of `%s'");
  
!       if (failure == 2)
  	{
  	  if (do_default)
--- 3636,3640 ----
  	error_with_decl (decl, "initializer fails to determine size of `%s'");
  
!       else if (failure == 2)
  	{
  	  if (do_default)
*************** finish_decl (decl, init, asmspec_tree)
*** 3653,3658 ****
  	 in the array, because we start counting at zero.  Therefore,
  	 warn only if the value is less than zero.  */
!       if (pedantic && TYPE_DOMAIN (type) != 0
! 	  && tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
  	error_with_decl (decl, "zero or negative size array `%s'");
  
--- 3653,3658 ----
  	 in the array, because we start counting at zero.  Therefore,
  	 warn only if the value is less than zero.  */
!       else if (pedantic && TYPE_DOMAIN (type) != 0
! 	      && tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
  	error_with_decl (decl, "zero or negative size array `%s'");
  

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