This is the mail archive of the gcc-bugs@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]

[980307]: Warning patches #4/5 - Missing braces, brackets, parens...


gcc/ChangeLog:

Sun Mar  8 17:06:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* i386.h (RTX_COSTS): Insert braces around nested if.
	(ADDITIONAL_REGISTER_NAMES): Insert braces around structured
	elements.

	* gcc.c (default_compilers): Properly put brackets around array elements in
	initializer.

	* getopt.c (_getopt_internal): Add explicit braces around nested if;
	reformatted.

	* reg-stack.c (record_asm_reg_life): Add explicit braces around nested if's.
	(record_reg_life_pat): Add explicit parens around && and || in expression.
	(stack_reg_life_analysis): Add parens around assignment used as expression.
	(convert_regs): Likewise.


gcc/cp/ChangeLog:

Sun Mar  8 17:13:38 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* lang-specs.h: Properly put brackets around array elements in initializer.

	* typeck.c (build_binary_op_nodefault): Add explicit parens around
	&& and || in expression.


gcc/f/ChangeLog.egcs:

Sun Mar  8 17:34:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* lang-specs.h: Properly put brackets around array elements in initializer.

diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/config/i386/i386.h egcs-980307/gcc/config/i386/i386.h
*** egcs-980307.orig/gcc/config/i386/i386.h	Sat Mar  7 15:08:19 1998
--- egcs-980307/gcc/config/i386/i386.h	Sun Mar  8 14:51:53 1998
*************** while (0)
*** 1924,1933 ****
      if (GET_MODE (XEXP (X, 0)) == DImode)				\
        {									\
  	if (GET_CODE (XEXP (X, 1)) == CONST_INT)			\
! 	  if (INTVAL (XEXP (X, 1)) > 32)					\
! 	    return COSTS_N_INSNS(ix86_cost->shift_const + 2);		\
! 	  else								\
  	    return COSTS_N_INSNS(ix86_cost->shift_const * 2);		\
  	return ((GET_CODE (XEXP (X, 1)) == AND				\
  		 ? COSTS_N_INSNS(ix86_cost->shift_var * 2)		\
  		 : COSTS_N_INSNS(ix86_cost->shift_var * 6 + 2))		\
--- 1924,1934 ----
      if (GET_MODE (XEXP (X, 0)) == DImode)				\
        {									\
  	if (GET_CODE (XEXP (X, 1)) == CONST_INT)			\
! 	  {								\
! 	    if (INTVAL (XEXP (X, 1)) > 32)				\
! 	      return COSTS_N_INSNS(ix86_cost->shift_const + 2);		\
  	    return COSTS_N_INSNS(ix86_cost->shift_const * 2);		\
+ 	  }								\
  	return ((GET_CODE (XEXP (X, 1)) == AND				\
  		 ? COSTS_N_INSNS(ix86_cost->shift_var * 2)		\
  		 : COSTS_N_INSNS(ix86_cost->shift_var * 6 + 2))		\
*************** extern struct rtx_def *(*i386_compare_ge
*** 2332,2341 ****
  /* Table of additional register names to use in user input.  */
  
  #define ADDITIONAL_REGISTER_NAMES \
! { "eax", 0, "edx", 1, "ecx", 2, "ebx", 3,	\
!   "esi", 4, "edi", 5, "ebp", 6, "esp", 7,	\
!   "al", 0, "dl", 1, "cl", 2, "bl", 3,		\
!   "ah", 0, "dh", 1, "ch", 2, "bh", 3 }
  
  /* Note we are omitting these since currently I don't know how
  to get gcc to use these, since they want the same but different
--- 2333,2342 ----
  /* Table of additional register names to use in user input.  */
  
  #define ADDITIONAL_REGISTER_NAMES \
! { { "eax", 0 }, { "edx", 1 }, { "ecx", 2 }, { "ebx", 3 },	\
!   { "esi", 4 }, { "edi", 5 }, { "ebp", 6 }, { "esp", 7 },	\
!   { "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 },		\
!   { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 } }
  
  /* Note we are omitting these since currently I don't know how
  to get gcc to use these, since they want the same but different
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/cp/lang-specs.h egcs-980307/gcc/cp/lang-specs.h
*** egcs-980307.orig/gcc/cp/lang-specs.h	Tue Jan 27 00:00:03 1998
--- egcs-980307/gcc/cp/lang-specs.h	Sun Mar  8 13:13:39 1998
*************** Boston, MA 02111-1307, USA.  */
*** 21,34 ****
  /* This is the contribution to the `default_compilers' array in gcc.c for
     g++.  */
  
!   {".cc", "@c++"},
!   {".cp", "@c++"},
!   {".cxx", "@c++"},
!   {".cpp", "@c++"},
!   {".c++", "@c++"},
!   {".C", "@c++"},
    {"@c++",
!    "cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C++ does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
  	-undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
--- 21,34 ----
  /* This is the contribution to the `default_compilers' array in gcc.c for
     g++.  */
  
!   {".cc", {"@c++"}},
!   {".cp", {"@c++"}},
!   {".cxx", {"@c++"}},
!   {".cpp", {"@c++"}},
!   {".c++", {"@c++"}},
!   {".C", {"@c++"}},
    {"@c++",
!    {"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C++ does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
  	-undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
*************** Boston, MA 02111-1307, USA.  */
*** 37,43 ****
          %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
  			    %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
  			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			    %{v:-version} %{pg:-p} %{p}\
--- 37,43 ----
          %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!     "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
  			    %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
  			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			    %{v:-version} %{pg:-p} %{p}\
*************** Boston, MA 02111-1307, USA.  */
*** 46,55 ****
  			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"},
!   {".ii", "@c++-cpp-output"},
    {"@c++-cpp-output",
!    "%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
  			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			    %{v:-version} %{pg:-p} %{p}\
  			    %{f*} %{+e*} %{aux-info*}\
--- 46,55 ----
  			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"}},
!   {".ii", {"@c++-cpp-output"}},
    {"@c++-cpp-output",
!    {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
  			    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			    %{v:-version} %{pg:-p} %{p}\
  			    %{f*} %{+e*} %{aux-info*}\
*************** Boston, MA 02111-1307, USA.  */
*** 57,60 ****
  			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	            %{!S:as %a %Y\
  			    %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			    %{!pipe:%g.s} %A\n }}}}"},
--- 57,60 ----
  			    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	            %{!S:as %a %Y\
  			    %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			    %{!pipe:%g.s} %A\n }}}}"}},
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/cp/typeck.c egcs-980307/gcc/cp/typeck.c
*** egcs-980307.orig/gcc/cp/typeck.c	Thu Mar  5 09:20:56 1998
--- egcs-980307/gcc/cp/typeck.c	Sun Mar  8 15:45:52 1998
*************** build_binary_op_nodefault (code, orig_op
*** 3820,3831 ****
  	     the unsigned quantity is an integral constant and it does
  	     not use the most significant bit of result_type.  */
  	  else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR)
! 		   && ((op0_signed && TREE_CODE (orig_op1) == INTEGER_CST
! 			&& int_fits_type_p (orig_op1,
! 					    signed_type (result_type))
! 			|| (op1_signed && TREE_CODE (orig_op0) == INTEGER_CST
! 			    && int_fits_type_p (orig_op0,
! 						signed_type (result_type))))))
  	    /* OK */;
  	  else
  	    warning ("comparison between signed and unsigned");
--- 3820,3831 ----
  	     the unsigned quantity is an integral constant and it does
  	     not use the most significant bit of result_type.  */
  	  else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR)
! 		   && (((op0_signed && TREE_CODE (orig_op1) == INTEGER_CST
! 			 && int_fits_type_p (orig_op1,
! 					     signed_type (result_type)))
! 		    || ((op1_signed && TREE_CODE (orig_op0) == INTEGER_CST
! 			 && int_fits_type_p (orig_op0,
! 					     signed_type (result_type)))))))
  	    /* OK */;
  	  else
  	    warning ("comparison between signed and unsigned");
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/f/lang-specs.h egcs-980307/gcc/f/lang-specs.h
*** egcs-980307.orig/gcc/f/lang-specs.h	Tue Jan 27 00:00:04 1998
--- egcs-980307/gcc/f/lang-specs.h	Sun Mar  8 13:24:04 1998
*************** the Free Software Foundation, 59 Temple 
*** 33,40 ****
  #define OO ".o"
  #endif
  
!   {".F", "@f77-cpp-input"},
!   {".fpp", "@f77-cpp-input"},
    {"@f77-cpp-input",
       /* For f77 we want -traditional to avoid errors with, for
  	instance, mismatched '.  Also, we avoid unpleasant surprises
--- 33,40 ----
  #define OO ".o"
  #endif
  
!   {".F", {"@f77-cpp-input"}},
!   {".fpp", {"@f77-cpp-input"}},
    {"@f77-cpp-input",
       /* For f77 we want -traditional to avoid errors with, for
  	instance, mismatched '.  Also, we avoid unpleasant surprises
*************** the Free Software Foundation, 59 Temple 
*** 43,49 ****
  	Sun f77, at least) so you test `__unix' rather than `unix'.
  	-D_LANGUAGE_FORTRAN is used by some compilers like SGI and
  	might as well be in there. */
!    "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
  	-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
--- 43,49 ----
  	Sun f77, at least) so you test `__unix' rather than `unix'.
  	-D_LANGUAGE_FORTRAN is used by some compilers like SGI and
  	might as well be in there. */
!    {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
  	-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
*************** the Free Software Foundation, 59 Temple 
*** 52,58 ****
  	%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
  	%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} -fset-g77-defaults %(f771) \
  		   %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
  		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
--- 52,58 ----
  	%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
  	%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!     "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} -fset-g77-defaults %(f771) \
  		   %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
  		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
*************** the Free Software Foundation, 59 Temple 
*** 61,73 ****
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	      %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
! 		      %{!pipe:%g.s} %A\n }}}}"},
!   {".r", "@ratfor"},
    {"@ratfor",
!    "ratfor %{C} %{v}\
             %{C:%{!E:%eGNU C does not support -C without using -E}}\
             %{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
!    "%{!E:f771 %{!pipe:%g.f} -fset-g77-defaults %(f771) \
  	   %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a}\
  	   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
  	   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
--- 61,73 ----
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	      %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
! 		      %{!pipe:%g.s} %A\n }}}}"}},
!   {".r", {"@ratfor"}},
    {"@ratfor",
!    {"ratfor %{C} %{v}\
             %{C:%{!E:%eGNU C does not support -C without using -E}}\
             %{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
!     "%{!E:f771 %{!pipe:%g.f} -fset-g77-defaults %(f771) \
  	   %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a}\
  	   %{g*} %{O*} %{W*} %{w} %{pedantic*} \
  	   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
*************** the Free Software Foundation, 59 Temple 
*** 76,86 ****
  	   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	   %{!S:as %a %Y\
  	   %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
!            %{!pipe:%g.s} %A\n }}"},
!   {".f", "@f77"},
!   {".for", "@f77"},
    {"@f77",
!    "%{!M:%{!MM:%{!E:f771 %i -fset-g77-defaults %(f771) \
  		   %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*}\
  		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
--- 76,86 ----
  	   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	   %{!S:as %a %Y\
  	   %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
!            %{!pipe:%g.s} %A\n }}"}},
!   {".f", {"@f77"}},
!   {".for", {"@f77"}},
    {"@f77",
!    {"%{!M:%{!MM:%{!E:f771 %i -fset-g77-defaults %(f771) \
  		   %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*}\
  		   %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
*************** the Free Software Foundation, 59 Temple 
*** 89,95 ****
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	      %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
! 		      %{!pipe:%g.s} %A\n }}}}"},
  
  #undef OO
  
--- 89,95 ----
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  	      %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
! 		      %{!pipe:%g.s} %A\n }}}}"}},
  
  #undef OO
  
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/gcc.c egcs-980307/gcc/gcc.c
*** egcs-980307.orig/gcc/gcc.c	Sun Mar  1 16:10:04 1998
--- egcs-980307/gcc/gcc.c	Sun Mar  8 16:02:53 1998
*************** static struct compiler default_compilers
*** 568,582 ****
       were not present when we built the driver, we will hit these copies
       and be given a more meaningful error than "file not used since
       linking is not done".  */
!   {".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"}, {".c++", "#C++"},
!   {".C", "#C++"}, {".ads", "#Ada"}, {".adb", "#Ada"}, {".ada", "#Ada"},
!   {".f", "#Fortran"}, {".for", "#Fortran"}, {".F", "#Fortran"},
!   {".fpp", "#Fortran"},
!   {".p", "#Pascal"}, {".pas", "#Pascal"},
    /* Next come the entries for C.  */
!   {".c", "@c"},
    {"@c",
!    "cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
--- 572,586 ----
       were not present when we built the driver, we will hit these copies
       and be given a more meaningful error than "file not used since
       linking is not done".  */
!   {".cc", {"#C++"}}, {".cxx", {"#C++"}}, {".cpp", {"#C++"}}, {".c++", {"#C++"}},
!   {".C", {"#C++"}}, {".ads", {"#Ada"}}, {".adb", {"#Ada"}}, {".ada", {"#Ada"}},
!   {".f", {"#Fortran"}}, {".for", {"#Fortran"}}, {".F", {"#Fortran"}},
!   {".fpp", {"#Fortran"}},
!   {".p", {"#Pascal"}}, {".pas", {"#Pascal"}},
    /* Next come the entries for C.  */
!   {".c", {"@c"}},
    {"@c",
!    {"cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
*************** static struct compiler default_compilers
*** 587,593 ****
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \
  		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
--- 591,597 ----
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!     "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \
  		   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
*************** static struct compiler default_compilers
*** 596,604 ****
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"},
    {"-",
!    "%{E:cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
--- 600,608 ----
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"}},
    {"-",
!    {"%{E:cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
*************** static struct compiler default_compilers
*** 609,618 ****
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %W{o*}}\
!     %{!E:%e-E required when input is from standard input}"},
!   {".m", "@objective-c"},
    {"@objective-c",
!    "cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__OBJC__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
--- 613,622 ----
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %W{o*}}\
!     %{!E:%e-E required when input is from standard input}"}},
!   {".m", {"@objective-c"}},
    {"@objective-c",
!    {"cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
          -undef -D__OBJC__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
*************** static struct compiler default_compilers
*** 623,629 ****
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.i} %1 \
  		   %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a*}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \
--- 627,633 ----
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!     "%{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.i} %1 \
  		   %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a*}\
  		   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \
*************** static struct compiler default_compilers
*** 633,642 ****
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"},
!   {".h", "@c-header"},
    {"@c-header",
!    "%{!E:%eCompilation of header file requested} \
      cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
--- 637,646 ----
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
                %{!S:as %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
!                       %{!pipe:%g.s} %A\n }}}}"}},
!   {".h", {"@c-header"}},
    {"@c-header",
!    {"%{!E:%eCompilation of header file requested} \
      cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
*************** static struct compiler default_compilers
*** 647,656 ****
          %{traditional} %{ftraditional:-traditional}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
!         %i %W{o*}"},
!   {".i", "@cpp-output"},
    {"@cpp-output",
!    "%{!M:%{!MM:%{!E:cc1 %i %1 %{!Q:-quiet} %{d*} %{m*} %{a*}\
  			%{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			%{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  			%{aux-info*}\
--- 651,660 ----
          %{traditional} %{ftraditional:-traditional}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
!         %i %W{o*}"}},
!   {".i", {"@cpp-output"}},
    {"@cpp-output",
!    {"%{!M:%{!MM:%{!E:cc1 %i %1 %{!Q:-quiet} %{d*} %{m*} %{a*}\
  			%{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
  			%{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  			%{aux-info*}\
*************** static struct compiler default_compilers
*** 658,672 ****
  			%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  		     %{!S:as %a %Y\
  			     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			     %{!pipe:%g.s} %A\n }}}}"},
!   {".s", "@assembler"},
    {"@assembler",
!    "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
  		            %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			    %i %A\n }}}}"},
!   {".S", "@assembler-with-cpp"},
    {"@assembler-with-cpp",
!    "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\
          -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
--- 662,676 ----
  			%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
  		     %{!S:as %a %Y\
  			     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			     %{!pipe:%g.s} %A\n }}}}"}},
!   {".s", {"@assembler"}},
    {"@assembler",
!    {"%{!M:%{!MM:%{!E:%{!S:as %a %Y\
  		            %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 			    %i %A\n }}}}"}},
!   {".S", {"@assembler-with-cpp"}},
    {"@assembler-with-cpp",
!    {"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\
          -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
*************** static struct compiler default_compilers
*** 675,686 ****
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
                      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 		    %{!pipe:%g.s} %A\n }}}}"},
  #include "specs.h"
    /* Mark end of table */
!   {0, 0}
  };
  
  /* Number of elements in default_compilers, not counting the terminator.  */
--- 679,690 ----
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!     "%{!M:%{!MM:%{!E:%{!S:as %a %Y\
                      %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
! 		    %{!pipe:%g.s} %A\n }}}}"}},
  #include "specs.h"
    /* Mark end of table */
!   {0, {0}}
  };
  
  /* Number of elements in default_compilers, not counting the terminator.  */
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/getopt.c egcs-980307/gcc/getopt.c
*** egcs-980307.orig/gcc/getopt.c	Sat Dec  6 18:20:51 1997
--- egcs-980307/gcc/getopt.c	Sun Mar  8 12:27:29 1998
*************** _getopt_internal (argc, argv, optstring,
*** 690,710 ****
  	      else
  		{
  		  if (opterr)
! 		   if (argv[optind - 1][1] == '-')
! 		    /* --option */
! 		    fprintf (stderr,
! 		     _("%s: option `--%s' doesn't allow an argument\n"),
! 		     argv[0], pfound->name);
! 		   else
! 		    /* +option or -option */
! 		    fprintf (stderr,
! 		     _("%s: option `%c%s' doesn't allow an argument\n"),
! 		     argv[0], argv[optind - 1][0], pfound->name);
  
! 		  nextchar += strlen (nextchar);
  
! 		  optopt = pfound->val;
! 		  return '?';
  		}
  	    }
  	  else if (pfound->has_arg == 1)
--- 690,712 ----
  	      else
  		{
  		  if (opterr)
! 		    {
! 		      if (argv[optind - 1][1] == '-')
! 			/* --option */
! 			fprintf (stderr,
! 				 _("%s: option `--%s' doesn't allow an argument\n"),
! 				 argv[0], pfound->name);
! 		      else
! 			/* +option or -option */
! 			fprintf (stderr,
! 				 _("%s: option `%c%s' doesn't allow an argument\n"),
! 				 argv[0], argv[optind - 1][0], pfound->name);
  
! 		      nextchar += strlen (nextchar);
  
! 		      optopt = pfound->val;
! 		      return '?';
! 		    }
  		}
  	    }
  	  else if (pfound->has_arg == 1)
diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980307.orig/gcc/reg-stack.c egcs-980307/gcc/reg-stack.c
*** egcs-980307.orig/gcc/reg-stack.c	Fri Feb 13 16:33:15 1998
--- egcs-980307/gcc/reg-stack.c	Sun Mar  8 15:26:13 1998
*************** record_asm_reg_life (insn, regstack, ope
*** 940,953 ****
    bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output));
    for (i = 0; i < n_outputs; i++)
      if (STACK_REG_P (operands[i]))
!       if (reg_class_size[(int) operand_class[i]] != 1)
! 	{
! 	  error_for_asm
! 	    (insn, "Output constraint %d must specify a single register", i);
! 	  malformed_asm = 1;
! 	}
!       else
! 	reg_used_as_output[REGNO (operands[i])] = 1;
  
  
    /* Search for first non-popped reg.  */
--- 940,954 ----
    bzero ((char *) reg_used_as_output, sizeof (reg_used_as_output));
    for (i = 0; i < n_outputs; i++)
      if (STACK_REG_P (operands[i]))
!       {
! 	if (reg_class_size[(int) operand_class[i]] != 1)
! 	  {
! 	    error_for_asm (insn, "Output constraint %d must specify a single register", i);
! 	    malformed_asm = 1;
! 	  }
!         else
! 	  reg_used_as_output[REGNO (operands[i])] = 1;
!       }
  
  
    /* Search for first non-popped reg.  */
*************** record_asm_reg_life (insn, regstack, ope
*** 1037,1046 ****
        rtx op = operands[i];
  
        if (! STACK_REG_P (op))
! 	if (stack_regs_mentioned_p (op))
! 	  abort ();
! 	else
! 	  continue;
  
        /* Each destination is dead before this insn.  If the
  	 destination is not used after this insn, record this with
--- 1038,1049 ----
        rtx op = operands[i];
  
        if (! STACK_REG_P (op))
! 	{
! 	  if (stack_regs_mentioned_p (op))
! 	    abort ();
! 	  else
! 	    continue;
! 	}
  
        /* Each destination is dead before this insn.  If the
  	 destination is not used after this insn, record this with
*************** record_asm_reg_life (insn, regstack, ope
*** 1057,1066 ****
    for (i = first_input; i < first_input + n_inputs; i++)
      {
        if (! STACK_REG_P (operands[i]))
! 	if (stack_regs_mentioned_p (operands[i]))
! 	  abort ();
! 	else
! 	  continue;
  
        /* If an input is dead after the insn, record a death note.
  	 But don't record a death note if there is already a death note,
--- 1060,1071 ----
    for (i = first_input; i < first_input + n_inputs; i++)
      {
        if (! STACK_REG_P (operands[i]))
! 	{
! 	  if (stack_regs_mentioned_p (operands[i]))
! 	    abort ();
! 	  else
! 	    continue;
! 	}
  
        /* If an input is dead after the insn, record a death note.
  	 But don't record a death note if there is already a death note,
*************** record_reg_life_pat (pat, src, dest, dou
*** 1111,1117 ****
      }
  
    /* We don't need to consider either of these cases.  */
!   if (GET_CODE (pat) == USE && !douse || GET_CODE (pat) == CLOBBER)
      return;
  
    fmt = GET_RTX_FORMAT (GET_CODE (pat));
--- 1116,1122 ----
      }
  
    /* We don't need to consider either of these cases.  */
!   if ((GET_CODE (pat) == USE && !douse) || GET_CODE (pat) == CLOBBER)
      return;
  
    fmt = GET_RTX_FORMAT (GET_CODE (pat));
*************** stack_reg_life_analysis (first, stackent
*** 1469,1475 ****
     {
       rtx retvalue;
  
!      if (retvalue = stack_result (current_function_decl))
        {
          /* Find all RETURN insns and mark them.  */
  
--- 1474,1480 ----
     {
       rtx retvalue;
  
!      if ((retvalue = stack_result (current_function_decl)))
        {
          /* Find all RETURN insns and mark them.  */
  
*************** convert_regs ()
*** 3129,3135 ****
       value_reg_low = value_reg_high = -1;
        {
          rtx retvalue;
!         if (retvalue = stack_result (current_function_decl))
  	 {
  	   value_reg_low = REGNO (retvalue);
  	   value_reg_high = value_reg_low +
--- 3134,3140 ----
       value_reg_low = value_reg_high = -1;
        {
          rtx retvalue;
!         if ((retvalue = stack_result (current_function_decl)))
  	 {
  	   value_reg_low = REGNO (retvalue);
  	   value_reg_high = value_reg_low +


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