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]

Re: [PATCH] -### yet again!


At 4:13 PM -0700 11/8/01, Tom Tromey wrote:

>Hi Ira.  I hope you know, for your own sanity, that I have no
>authority to reject or accept your patch.  I'm pointing things out as
>I understand them; I hope it isn't too irritating.

Only mildly "irritating" since I was quite content with the original
patch.  But given it's simplicity it's not too bad tweaking it here
and there.  I would finally like to quit rebsubmitting this though.
I might be irritating everyone else with the rebmittals :-)


>I think that you must always quote the argument.  Suppose that an
>argument is `"foo"' (includes the double quotes).  Then your patch
>could print:
>
>     "cc1" "foo"
>
>Then the debugger (or other client) would strip the quotes, yielding:
>
>     argv[0] = cc1
>     argv[1] = foo
>
>... but this is incorrect.  The debugger ought to see argv[1] as
>`"foo"' -- with the quotes.

I just knew when I singled out the leading/outer quote case someone
would comment on that :-)


>It would be safe to avoid printing the enclosing quotes if the
>argument contained no spaces or quotes.  I don't know if that is
>important to you.  For that matter I don't know if any of these
>special cases are important to you.

They weren't since I was content on not even escaping embedded quotes.
I think it's good enough know for most cases.  After all this really
only for driver debugging and for debugging the compiler itself.  I
don't want to go overboard here.


>Finally, I think you must escape `\' if you are going to escape an
>embedded double quote.  Otherwise ambiguity can result.

Sigh :-(  I guess if I am going to do the escaped quotes I have to
add this too.  I might as well not make a special cause of outer
quotes either and escape them too while I'm in the neighborhood.

HEADS UP - another "last" -### patch is coming (tomorrow).

Ira


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