Bug 20948

Summary: Bug in GCC 2.96
Product: [Retired] Red Hat Linux Reporter: Need Real Name <slack>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-16 11:03:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-11-16 11:03:51 UTC
I want to report a bug in GCC 2.96 or in library qt-1.45.
 
File  qt_test.C which has only one line:
 
#include </usr/lib/qt-1.45/include/qregion.h>
 
 
After compilation, I got the error message:
 
~/Test>>c++ qt_test.C
In file included from qt_test.C:1:
/usr/lib/qt-1.45/include/qregion.h:73:182: "defined" without an identifier
 
 
 
I checked compiler version:
~/Test>>c++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
 
 
In older compiler (2.95), qt_test.C has no problem.
 
 
 
The problem with the file qregion.h is:
                        !defined(xor) 

 
 
To check this I made a file xor_test.C which has only the line
#if defined(xor)
 
The compilation result in version 2.96 was:
 
 
~/Test>>g++ xor_test.C
xor_test.C:1:13: "defined" without an identifier
 
On version 2.95   OK

Comment 1 Jakub Jelinek 2000-11-16 11:13:32 UTC
Qt 1.x (as opposed to Qt 2.x) is not proper C++ and thus cannot be compiled
by g++ 2.96 which is quite strict about C++ standard.
Qt 1.x / KDE 1 packages should be compiled using the compat-egcs-c++ compiler
(egcs++), make sure you pass -L/usr/lib to the compiler so that it does not
pick up glibc 2.1 compatibility libraries.
It would be wasted effort now that there is KDE 2 and Qt 2 to spent days on
fixing Qt 1 and KDE 1.