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

           Summary: patch to fix a compile error in lto-plugin.c when
                    using older C compilers
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: williamba...@hotmail.com


Created attachment 23867
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23867
patch to fix the problem

The build for gcc-4.6.0 gets a compile error on lto-plugin.c on Red Hat Linux
release 7.1 (Seawolf) with gcc version 2.96 20000731 because this compiler does
not allow declarations after the first statement.  The attached patch moves a
declaration a few lines back.

For the build, I ran
/u/gnu/gcc-4.6.0/configure --disable-nls --enable-checking=release
--enable-werror=no --with-system-zlib --disable-multilib --with-gmp=/usr/local
--with-mpfr=/usr/local
make CC=gcc 'CFLAGS=-O0  -g -pipe' 'LIBCFLAGS=-O0 ' 'LIBCXXFLAGS=-O0
-fno-implicit-templates ' 'CXXFLAGS=-O0 -fno-implicit-templates '
'CXXFLAGS_FOR_BUILD=-O0 -fno-implicit-templates ' 'CXXFLAGS_FOR_TARGET=-O0
-fno-implicit-templates ' 'GOCFLAGS_FOR_TARGET=-O0  -g -pipe' 'BOOT_CFLAGS= -O0
 -g -pipe' AS=/usr/bin/as bootstrap-lean
Without all of the -O0's, the stage2 xgcc gets an ICE almost immediately on
almost any input.

Reply via email to