Bug 77929 - Sources: kdevelop/cproject.cpp isn't ANSI compatible
Summary: Sources: kdevelop/cproject.cpp isn't ANSI compatible
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdevelop
Version: 7.3
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Petr Rockai
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-15 15:27 UTC by Sysoltsev Slawa
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-18 18:22:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Sysoltsev Slawa 2002-11-15 15:27:02 UTC
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):


How reproducible:
Always

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.

Additional info:

Comment 1 Petr Rockai 2006-07-17 18:21:31 UTC
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.

Comment 2 Bill Nottingham 2006-10-18 18:22:09 UTC
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
http://www.redhat.com/rhel/migrate/redhatlinux/.

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.


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