This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][1/n] LTO option handling reorg
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Oct 2011 15:49:25 +0000 (UTC)
- Subject: Re: [PATCH][1/n] LTO option handling reorg
- References: <alpine.LNX.email@example.com>
On Tue, 25 Oct 2011, Richard Guenther wrote:
> Joseph, does this look like a sensible use of the common
> machinery? Do we want the init from COLLECT_GCC_OPTIONS
> in opts-common.c instead?
Certainly there should be a single function to process COLLECT_GCC_OPTIONS
into an array of strings, even if only this one place needs then to
convert them to logical options. And that single function should actually
work properly with the quoting logic used in gcc.c to generate
COLLECT_GCC_OPTIONS - your code appears to ignore any possibility of '\''
being used for single-quotes in strings, and collect2.c:extract_string,
which is rather closer to what I'd expect, fails to reset backquote to 0
after processing the \'.
Note that decode_cmdline_options_to_array expects the array to start with
argv, the program name (though it's OK to have NULL there).
Joseph S. Myers