Bug 56074 - Option "don't use predefined -O flag" affects more than the -O flag
Summary: Option "don't use predefined -O flag" affects more than the -O flag
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 2.1.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-17 21:37 UTC by Leif Huhn
Modified: 2003-06-30 12:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Huhn 2003-03-17 21:37:50 UTC
Version:            (using KDE KDE 3.1)
Installed from:    SuSE RPMs
Compiler:          gcc 3.2 Suse 8.1
OS:          Linux

Checking the option "don't use predefined -O flag" under Project, Options, Configure Settings causes KDevelop (or configure, or whatever) to build the individual cpp files in the project without the CXXFLAGS.  With the box UNchecked both CPPFLAGS and CXXFLAGS are passed to gcc for every cpp file.

I'm not familiar enough with any of these things to know which is the correct behavior, but I'm pretty sure that checking a box that claims to affect the -O option shouldn't change which flags (other than -O) are passed to gcc.

Why is there this option at all?  It might make sense if you are familiar with the build process, but there is already an option to change the -O level.  This option is very confusing, because it doesn't specify what the predefined -O flag is, or where it came from.  This option also has no "What's This" help.  Building a project at -O0 can be very difficult when this "predefined -O" flag is applied, and then even when a user finds the option to turn off the "predefined -O flag" strange side effects occur.

Steps to reproduce:

Create new project (I created a KDE Normal) template.  Go to Project, Options, Compiler Options, Flags and Warnings.  In the CPPFLAGS box type -DHONORCPPFLAGS.  In the CXXFLAGS box type -DHONORCXXFLAGS.  Click Ok.  Go to Build, DistClean/Rebuild All.  Watch as gcc is passed both defines for the cpp files.  After the build process is finished, go to Project, Options, Configure Options.  Check "Don't use predefined -O flag" and click Ok.  Go to build, DistClean/Rebuild All.  Watch as the project builds with only the -DHONORCPPFLAGS passed to gcc for the cpp files.
Comment 1 Amilcar do Carmo Lucas 2003-05-22 16:37:57 UTC
This is a KDevelop2 bug. 
KDevelop2 is no longet under development. 
 
Please update to KDevelop 3. This bug is not present there! 
 
Comment 2 Amilcar do Carmo Lucas 2003-06-30 12:27:37 UTC
Going to close it as fixed 
Comment 3 Amilcar do Carmo Lucas 2003-06-30 12:27:56 UTC
*** Bug has been marked as fixed ***.