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]

[PATCH] Minor g++ command line processing cleanup.


This is a truly trivial patch to tidy up part of the command line
processing in the g++ frontend.  Instead of testing p against both
"handle-exceptions" and "no-handle-exceptions", it is sufficient
to test positive_option against "handle-exceptions".  Whilst I was
there I also tidied up some of the whitespace in the diff context.

Tested with a complete bootstrap (all languages except Ada and treelang)
and "make -k check" in the gcc subdirectory on i686-pc-linux-gnu with
no new regressions.

Ok for mainline?


2002-07-20  Roger Sayle  <roger@eyesopen.com>

	* cp/decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
	test by using positive_option.  Make whitespace consistent.


Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.545
diff -c -3 -p -r1.545 decl2.c
*** cp/decl2.c	9 Jul 2002 23:31:28 -0000	1.545
--- cp/decl2.c	17 Jul 2002 03:21:45 -0000
*************** cxx_decode_option (argc, argv)
*** 509,524 ****
  	  return 1;
  	}

!       if (!strcmp (p, "handle-exceptions")
! 	  || !strcmp (p, "no-handle-exceptions"))
  	warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)");
!       else if (! strcmp (p, "alt-external-templates"))
  	{
  	  flag_external_templates = 1;
  	  flag_alt_external_templates = 1;
            cp_deprecated ("-falt-external-templates");
  	}
!       else if (! strcmp (p, "no-alt-external-templates"))
  	flag_alt_external_templates = 0;
        else if (!strcmp (p, "repo"))
  	{
--- 509,523 ----
  	  return 1;
  	}

!       if (!strcmp (positive_option, "handle-exceptions"))
  	warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)");
!       else if (!strcmp (p, "alt-external-templates"))
  	{
  	  flag_external_templates = 1;
  	  flag_alt_external_templates = 1;
            cp_deprecated ("-falt-external-templates");
  	}
!       else if (!strcmp (p, "no-alt-external-templates"))
  	flag_alt_external_templates = 0;
        else if (!strcmp (p, "repo"))
  	{

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]