Bug#40512: user-defined C++ compiler options ignored

james.fischer at nexsi.com james.fischer at nexsi.com
Mon Apr 8 22:34:02 UTC 2002


Package: kdevelop
Version: 2.0.2 (using KDE 2.2.2 -1)
Severity: normal
Installed from:    Red Hat Linux 7.2
Compiler:          gcc 3.x
OS:                Linux (i686) release 2.4.7-10
OS/Compiler notes: Not Specified

KDevelop 2.0 and 2.1 both have a design flaw that implicitly disables C++ compiler options that the user tries to enable via the GUI. For example: 

<KDevelop 2.0,>

1) Start KDevelop 2.0 and create a C++ terminal project.

2) Select "Project | Options..." from the main menu.

3) Select "Compiler Options"

4) Type "-fexceptions" in the "additional options:" text entry field.

5) Click "OK"

6) Select "Build | Rebuild" from the main menu.

7) Observe the output in the "messages" window. Specifically, note the fact that KDevelop has implicitly added the -fno-exceptions option *AFTER* the user-defined option "-fexceptions" -- e.g.

<messages>

make[3]: Entering directory `/home/jfischer/temp/'
cc++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -fexceptions -fno-exceptions -fno-check-new  -c main.cpp
</messages>

In this case, KDevelop blindly injects the conflicting compiler option '-fno-exceptions' *AFTER* the user-defined option '-fexceptions'. Consequently, the C++ code cannot use C++ exception handling -- a required component for ANSI C++ code that uses the STL.

</Kdevelop 2.0>
This is clearly a design flaw. No other C/C++ development IDE on planet Earth: a) provides a dialog box for the user to define compiler options, and then b) injects conflicting, product-defined compiler options *after* the user-defined compiler options.

[n.b. The g++ 2.9x C++ compiler series IS DEFINITELY NOT ISO/ANSI C++ compliant. That compiler series was developed BEFORE the ISO/ANSI C++ standard even existed. The ISO/ANSI C++ standard library is vastly different from the C++ library that shipped with g++ 2.9x. When using the ISO/ANSI C++ standard template library -- e.g., iostreams, containers, memory allocation / deallocation, locales, etc. -- RTTI and exception handling MUST BE ENABLED BY DEFAULT. If there is any doubt to the validity of this statement, please read the ISO/ANSI C++ standard [ISO/ANSI 14882:1998]. The standard can be purchased and downloaded in Adobe Acrobat format for $18[US] from the following web site:

    http://webstore.ansi.org/

Click on the "standards search" link, and then search for "14882-1998". (Note: If you search for "14882:1998" the engine will bring up the $250[US] printed, bound manual and not the $18 Adobe Acrobat .pdf file.)]


(Submitted via bugs.kde.org)
(Called from KBugReport dialog. Fields Compiler manually changed)





More information about the KDevelop-devel mailing list