Bug 18654 - g++ fails for qregion.h (qt1x-devel)
g++ fails for qregion.h (qt1x-devel)
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-08 15:48 EDT by pdenis2
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-08 15:48:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description pdenis2 2000-10-08 15:48:18 EDT
Compiling, e.g., kgrep (http://www.logikos.com/devcom/projects/kgrep/)
fails for the qt-1.45 header qregion.h.  The compiler chokes on line 73 in
qregion.h which reads (I know it's ugly and appears to be a kludge of
sorts):

#if !(defined(__STRICT_ANSI__) && defined(_CC_GNU_)) && !defined(_CC_EDG_)
&& !defined(_CC_HP_) && !defined(_CC_HP_ACC_) && !defined(_CC_USLC_) &&
!defined(_CC_MWERKS_) && !defined(xor)

Error msg: 73:182 "defined" without an identifier


The lexer/parser can't handle the 'defined(xor)' at the end; apparently
trying to 'hide' the xor at the end of a series of (failed) &&s no longer
works.

If you don't want to bother with kgrep, just put an #include 'qregion.h'
line at the top of a "hello, world" source file and you'll get the same
error msg. Or put an "#if defined(somethingnotdefined) && defined(xor)"
into hello, world.

I don't really care about kgrep, but this seems to apply to any program
that wants qregion.h.  If this is the appropriate compiler behavior then
qt1x needs fixing.  BTW - kgrep compiled/ran fine under gcc 2.95.
Comment 1 Jakub Jelinek 2000-10-08 16:00:35 EDT
`xor' is special in C++ (like `and' and other keywords), you cannot
use them this way. Qt1 and KDE1 is full of these bugs, basically
unless you want to patch many things in it, you should use older
compiler for compiling Qt1 and KDE1 programs. KDE1/Qt1 programs
in the distribution are built with compat-egcs-c++ (command egcs++),
so basically you just need to make sure that instead of g++ the
Makefiles use egcs++ and -L/usr/lib in the CFLAGS, e.g. by:
export CXX="egcs++ -L/usr/lib" CC="egcs -L/usr/lib"
before running configure of those KDE1/Qt1 packages.
KDE2 is already valid C++, see http://master.kde.org/~bero/ for
rpms (or for KDE2 last beta look at the preview directory in RHL7).

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