gcc -v --help is inconsistent about where it places its output.  If I try to
redirect the output to a file (which is rather a reasonable thing to do, given
how long it is!), some of it still gets printed to the console via standard
error:

----------------------------------------------------------------------------
> bin-4.2/bin/gcc -v --help > /dev/null
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../svn-source-4.2/configure --verbose
--prefix=/home/brooks/bin-4.2 --enable-languages=c,c++,fortran : (reconfigured)
../svn-source-4.2/configure --verbose --prefix=/home/brooks/bin-4.2
--enable-languages=c,c++,fortran : (reconfigured) ../svn-source-4.2/configure
--verbose --prefix=/home/brooks/bin-4.2 --enable-languages=c,c++,fortran :
(reconfigured) ../svn-source-4.2/configure --verbose
--prefix=/home/brooks/bin-4.2 --enable-languages=c,c++,fortran --no-create
--no-recursion : (reconfigured) ../svn-source-4.2/configure --verbose
--prefix=/home/brooks/bin-4.2 --enable-languages=c,c++,fortran --no-create
--no-recursion : (reconfigured) ../svn-source-4.2/configure --verbose
--prefix=/home/brooks/bin-4.2 --enable-languages=c,c++,fortran --no-create
--no-recursion
Thread model: posix
gcc version 4.2.0 20070305 (prerelease)

 /home/brooks/bin-4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1 -quiet -v
help-dummy -quiet -dumpbase help-dummy -mtune=generic -auxbase help-dummy
-version --help -o /tmp/cccRY7zh.s

 as -V -Qy --help -o /tmp/ccQzyIru.o /tmp/cccRY7zh.s
GNU assembler version 2.15 (i386-linux) using BFD version 2.15

 /home/brooks/bin-4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/collect2
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 --help
/usr/lib/crt1.o /usr/lib/crti.o
/home/brooks/bin-4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o
-L/home/brooks/bin-4.2/lib/gcc/i686-pc-linux-gnu/4.2.0
-L/home/brooks/bin-4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../.. /tmp/ccQzyIru.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /home/brooks/bin-4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/crtend.o
/usr/lib/crtn.o
----------------------------------------------------------------------------

FWIW, this error only seems to be present with the gcc -v --help output; the
regular gcc --help output all goes into the file, as expected.


-- 
           Summary: gcc -v --help puts some output on std. out, and some on
                    std. error.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: brooks at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to