[Bug driver/12201] Apostrophes in gcc -v output

drow at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Sep 13 19:09:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12201


drow at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geoffk at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-13 17:42:09
               date|                            |


------- Additional Comments From drow at gcc dot gnu dot org  2003-09-13 17:42 -------
Geoff, this is caused by your patch to quote TOPLEVEL_CONFIGURE_ARGUMENTS.

First of all, you added an apostrophe at the beginning of every argument.  Did
you mean to add one at the end too?  Secondly, I'm pretty sure the arguments
aren't expanded by the shell.  I believe you took the backslash-doubling from
autoconf's handling of program_transform_name; there, the backslashes are
expanded by the surrounding backticks (echo `echo gcc | sed '$(transform)'`)
parses one more layer of backslashes than echo gcc | sed '$(transform)' does).

I've attached a patch which should fix the extra apostrophes without breaking
--program-transform-name, I'd appreciate it if you could try it.  I tested with:
 ../gcc/configure '--program-transform-name=/^[cg][^.-]*$/s/\(.*\)$/\1-3.4/'
which is really as pathalogical as you can get.  It works with bash, but not
with ash (due to a bug in autoconf!).

Reading specs from
/nevyn/big/fsf/projects/autoconf/oo/foo/bin/../lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure
--program-transform-name=/^[cg][^.-]*$/s/\(.*\)$/\1-3.4/ --prefix=/foo
--enable-languages=c

i.e. not quoted well enough to just paste into the shell, but I think that's
OK.



More information about the Gcc-bugs mailing list