Bug 191386 - GCC fails to compile itself and other programs
GCC fails to compile itself and other programs
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2006-05-11 11:07 EDT by Axel Liljencrantz
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-11 11:19:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Axel Liljencrantz 2006-05-11 11:07:56 EDT
Description of problem:

The gcc version shipped with Fedora Core 5 fails to compile a large number of
programs because of stricter code parsing rules. Most notably gcc 3.3 no longer
compiles. Other programs include eterm.

When compiling GCC, the following output is produced:

gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H
-DGENERATOR_FILE    -I. -I. -I. -I./. -I./config -I./../include ./read-rtl.c -o
In file included from ./read-rtl.c:24:
./rtl.h:132: warning: type of bit-field ‘code’ is a GCC extension
./rtl.h:135: warning: type of bit-field ‘mode’ is a GCC extension
./read-rtl.c: In function ‘fatal_with_file_and_line’:
./read-rtl.c:53: warning: traditional C rejects ISO C style function definitions
./read-rtl.c: In function ‘read_rtx’:
./read-rtl.c:653: error: invalid lvalue in increment

The line in question (653) is a macro that uses a lot of spiffy macro magic. The
eterm problem is caused by similar code. 

Version-Release number of selected component (if applicable): 


How reproducible:


Steps to Reproduce:
1. Download and extract sourcecode for gcc 3.3.3
2. Run ./configure
3. Run make
Actual results:

Compilation fails

Expected results: 

Compilation produces a working compiler

Additional info:

This bug has turned my life into a Kafka-esque nigtmare. I try to compile eterm
in order to check on a bugreport for one of my projects,
http://roo.no-ip.org/fish. Eterm doesn't compile because of this bug. I figure
the compiler is to blame, so I try to compile my own gcc version. Gcc doesn't
compile because of this bug. I try to compile eterm on Fedora Core 4. The
configure script for libast fails during a cpp sanity check. I try to report
this bug on bugzilla. Bugzilla gives me a '500 - Internal server error'. I try
again later. Bugzilla bug search tool hangs.

Please help me.
Comment 1 Jakub Jelinek 2006-05-11 11:19:18 EDT
Casts as lvalue have been deprecated already in GCC 3.4 and removed in 4.0,
see http://gcc.gnu.org/gcc-4.0/changes.html.
http://gcc.gnu.org/gcc-3.4/changes.html documents how the code should be fixed.
As you haven't provided any details on what exactly doesn't compile in eterm,
I can't comment on it.
Also, not sure why you are trying exactly 3.3.3, last 3.3.x release was 3.3.6.
Comment 2 Axel Liljencrantz 2006-05-14 18:35:32 EDT
I think it's insane that GCC 4.1 can not compile a relatively recent GCC
version, such as GCC 3.3, but that is not your fault. Thanks for the quick help. 

Note You need to log in before you can comment on or make changes to this bug.