Red Hat Bugzilla – Bug 77929
Sources: kdevelop/cproject.cpp isn't ANSI compatible
Last modified: 2007-04-18 12:48:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Description of problem:
Compiling kdevelop by Intel C/C++ compiler I received such error:
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../kdevelop/widgets/qextmdi/include -
I../kdevelop/ctags -I../kdevelop/kpp -I../kdevelop/kpp -I../kdevelop/kwrite -
I/usr/include/kde -I/usr/lib/qt3-gcc2.96/include -I/usr/X11R6/include -
DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-
function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -
Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -
Wconversion -fno-builtin -g -O2 -O2 -march=i386 -mcpu=i686 -DNDEBUG -DNO_DEBUG -
D_GNU_SOURCE -fno-exceptions -fno-check-new -ftemplate-depth-99 -c cproject.cpp
cproject.cpp(1932): error #11: unrecognized preprocessing directive
#warning fixme: toplevel makefile detection when using VPATH RalfN
Problem here is that when "-ansi -pedantic" is specified in command line,
compiler must perform strict ANSI check. According to ANSI standart code in
cproject.cpp is illegal because #warning directive isn't described in ANSI C++
(look at section 16 - Preprocessing directives) therefore you cannot use it in
strict ANSI dialect code.
GNU C/C++ doesn't do STRICT ANSI check so illegal code passes succesfully
through it. But to increase Red Hat Linux portability you should synchronize
code written and "-ansi -pedantic" cmd-line options usage. "#warning" directive
in cproject.cpp should be changed to #error or removed or you should stop
using "-ansi -pedantic" in command line if your code isn't ANSI compatible.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. I'm afraid you won't be able to reproduce the error because you don't have
compiler I used.
Actual Results: Compilation error.
Expected Results: Built package.
This bug is reported against old release of Red Hat Linux or Fedora Core
that is no longer supported. Chances are that it has been already fixed in
newer Fedora Core release. If you still experience the problem with
current release of Fedora Core, please update the Version field (you may
need to switch Product to Fedora Core first) in the bug report and put it
back to NEW state.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
If this issue is still present in a current Fedora Core release, please
open a new bug with the relevant information.
Closing as CANTFIX.