Bug 37654 - gcc-4.3.1: stripping trailing backspace from args fools gcc
Summary: gcc-4.3.1: stripping trailing backspace from args fools gcc
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-26 15:39 UTC by mmokrejs
Modified: 2008-09-26 19:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mmokrejs 2008-09-26 15:39:35 UTC
$ gcc -g3\ -O0 mozilla/view/src/nsScrollPortView.cpp
cc1plus: error: unrecognised debug output level "3 -O0"
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-cld --enable-java-awt=gtk --with-arch=i686 --enable-languages=c,c++,java,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.1-r1 p1.1'
Thread model: posix
gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1) 
$
Comment 1 mmokrejs 2008-09-26 15:41:57 UTC
Happens also with 4.2.1 but not with 3.3.6.
Comment 2 brian 2008-09-26 17:18:37 UTC
Subject: Re:   New: gcc-4.3.1: stripping trailing backspace from 
 args fools gcc

What exact problem are you trying to report here?  Quoting a space with
\ to the shell causes it to not split the arguments into two words,
which means gcc receives an argv[1] = "-g3 -O0" which is obviously
bogus.  The error is correct.

It seems like you are confusing a 'make' feature of continuation lines
with the \-newline sequence.  But that's not what you're demonstrating
here, which is shell quoting.
Comment 3 mmokrejs 2008-09-26 17:24:25 UTC
I would actually think that the backslash should be removed by the shell but it is obviously not what happens. I believe your explanation is correct and gcc-3.3.6 did not have the check. However, it works with 3.3.6 while not with newer versions. ;-)

My real problem is https://bugzilla.mozilla.org/show_bug.cgi?id=455468 .

Clues?
Comment 4 Andreas Schwab 2008-09-26 19:27:59 UTC
Not a gcc bug.