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][1/n] LTO option handling reorg


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[0], the program name (though it's OK to have NULL there).

-- 
Joseph S. Myers
joseph@codesourcery.com


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