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]

Re: [patch] Fix PR debug/4252



On Tuesday, June 17, 2003, at 01:08 PM, Neil Booth wrote:


Bob Abeles wrote:-

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().

Thanks. I'd rather dump_switch_p were changed instead.


Neil.


Yes, that improves it:


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

	PR debug/4252
	* c-opts.c (c_common_handle_option): Pass -fdump argument suffix
	to dump_switch_p().
	* tree-dump.c (dump_switch_p): Handle -fdump argument suffix.

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 20:17:58 -0000
***************
*** 740,746 ****
        break;

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

--- 740,746 ----
        break;

      case OPT_fdump_:
!       if (!dump_switch_p (arg))
  	result = 0;
        break;

Index: tree-dump.c
===================================================================
RCS file: /home/rabeles/gnu-world/gcc-cvs/gcc/gcc/tree-dump.c,v
retrieving revision 1.13
diff -c -w -r1.13 tree-dump.c
*** tree-dump.c	8 Jun 2003 14:21:54 -0000	1.13
--- tree-dump.c	17 Jun 2003 20:35:44 -0000
***************
*** 732,738 ****
    const char *option_value;

for (ix = 0; ix != TDI_end; ix++)
! if ((option_value = skip_leading_substring (arg, dump_files[ix].swtch)))
{
const char *ptr = option_value;
int flags = 0;
--- 732,738 ----
const char *option_value;


for (ix = 0; ix != TDI_end; ix++)
! if ((option_value = skip_leading_substring (arg, dump_files[ix].swtch + strlen ("dump-"))))
{
const char *ptr = option_value;
int flags = 0;



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