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] PR41217 Driver crashes if -o specified without filename


On Mon, Oct 5, 2009 at 9:34 PM, Ryan Mansfield <rmansfield@qnx.com> wrote:
> Richard Guenther wrote:
>>
>> On Mon, Sep 14, 2009 at 4:08 PM, Ryan Mansfield <rmansfield@qnx.com>
>> wrote:
>>>
>>> Ryan Mansfield wrote:
>>>>
>>>> This patch fixes a crash if -o is specified without an argument.
>>>>
>>>> 2009-09-01 ?Ryan Mansfield ?<rmansfield@qnx.com>
>>>> ? ? ? PR driver/41217
>>>> ? ? ? * gcc.c (process_command): Check that -o argument was specified.
>>>>
>>>> Index: gcc.c
>>>> ===================================================================
>>>> --- gcc.c ? ? ? (revision 151276)
>>>> +++ gcc.c ? ? ? (working copy)
>>>> @@ -4161,7 +4161,10 @@
>>>> ? ? ? ? ? ? ? argv[i] = convert_filename (argv[i], ! have_c, 0);
>>>> ?#endif
>>>> ? ? ? ? ? ? /* Save the output name in case -save-temps=obj was used.
>>>> ?*/
>>>> - ? ? ? ? ? ? save_temps_prefix = xstrdup ((p[1] == 0) ? argv[i + 1] :
>>>> argv[i] + 1);
>>>> + ? ? ? ? ? ? if ((p[1] == 0) && ?argv[i + 1])
>>>> + ? ? ? ? ? ? ? save_temps_prefix = xstrdup(argv[i + 1]);
>>>> + ? ? ? ? ? ? ?else
>>>> + ? ? ? ? ? ? ? save_temps_prefix = xstrdup(argv[i] + 1);
>>>> ? ? ? ? ? ? goto normal_switch;
>>>>
>>>> ? ? ? ? ? default:
>>>
>>> Ping?
>>
>> Ok.
>>
>> Thanks,
>> Richard.
>
> Thanks. Could someone please apply the patch on my behalf?

Done, r152488.

Richard.


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