This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: An unreviewed patch for the gcc driver
Dave Korn wrote:
>> Here, the user is clearly not trying to pass a file to the linker;
>> instead, the user is trying to pass an option to the linker. So, for
>> starters, the error message doesn't make sense in this case; it should
>> say something like "linker option ignored because linking not done".
>
> Ah, I see that. I was thrown by the fact that 'blah' is very clearly not an
> option but a file name... I didn't realise it was a metasyntactic blah!
:-)
>> Do you still object to the change?
>
> Nope, I don't.
Thanks for reviewing Kazu's patch and for considering my justification
thereof.
I /think/ it will do the wrong thing in the corner case of
> passing an object file with no '.o' extension directly to the linker by using
> -Wl,<filename> but passing an object file behind the driver's back like that
> is not something we want to support or encourage anyway.
Yes, you're right: Kazu's patch will make us not warn about that weird
case. But, as you say, that seems a weird thing to do, and it seems the
lesser of evils not to warn about that odd case than to warn spuriously
about the actual option case.
Kazu, please check in the patch.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713