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] Fix PR debug/4252


Here is my proposed patch for PR debug/4252, "cc1: Invalid option `-fdump-translation-unit'". This patch re-constructs the complete flag name before passing it to dump_switch_p(). This is my first patch submission, so I'm assuming that sending to this list is what I need to do to have this patch considered. I've also updated the PR with this patch.

2003-06-17 Robert Abeles <rabeles@archaelogic.com>

        PR debug/4252
        * c-opts.c (c_common_handle_option): Put -fdump option into
	format expected by dump_switch_p().

Index: c-opts.c
===================================================================
RCS file: /home/rabeles/gnu-world/gcc-cvs/gcc/gcc/c-opts.c,v
retrieving revision 1.59
diff -c -w -r1.59 c-opts.c
*** c-opts.c	16 Jun 2003 05:47:00 -0000	1.59
--- c-opts.c	17 Jun 2003 18:22:24 -0000
***************
*** 740,747 ****
        break;

      case OPT_fdump_:
!       if (!dump_switch_p (option->opt_text + strlen ("f")))
  	result = 0;
        break;

      case OPT_ffreestanding:
--- 740,751 ----
        break;

case OPT_fdump_:
! {
! char *switch_name = concat (option->opt_text + strlen ("f"), arg, NULL);
! if (!dump_switch_p (switch_name))
result = 0;
+ free (switch_name);
+ }
break;


case OPT_ffreestanding:


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