This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 78866 - Source: -ansi used on ANSI C++ incompatible code
Source: -ansi used on ANSI C++ incompatible code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kdevelop (Show other bugs)
8.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Ngo Than
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-02 10:08 EST by Sysoltsev Slawa
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-02 10:16:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch which removes -ansi -pedantic from command line (2.63 KB, patch)
2002-12-02 10:16 EST, Sysoltsev Slawa
no flags Details | Diff

  None (edit)
Description Sysoltsev Slawa 2002-12-02 10:08:39 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
Compiling kdevelop on my system with Intel compiler I received such message 
during build:

checking for Qt... configure: error: Qt (>= Qt 3.0.3) (library qt-mt) not 
found. Please check your installation!
For more details about this problem, look at the end of config.log.
Make sure that you have compiled Qt with thread support!
error: Bad exit status from /users/compiler/tc_6/WORK_DIR/tmp/rpm-tmp.14449 (%
build)


But I have Qt3 installed so I began investigating.
Looking to config.log I realized that configure tried to compile test case 
which uses Qt with '-ansi -pedantic' options. But this is incorrect! Qt library 
uses STL library and gcc3.2 STL library contain GNU extensions: 
see /usr/include/c++/3.2/bits/stl_alloc.h(928) (where actually error is emitted 
with -ansi) and comment above:
  // Inhibit implicit instantiations for required instantiations,
  // which are defined via explicit instantiations elsewhere.
  // NB: This syntax is a GNU extension.

This syntax (I mean 'extern template') isn't described in ANSI C++ specification
(see paragraph 14.7.2 - Explicit instantiation) and therefore isn't allowed 
when -ansi specified in compiler command line.
GNU compiler doesn't STRICT ANSI check so code passes succesfully, but strict 
compiler will emit error. To increase Red Hat Linux portability you shouldn't 
use '-ansi -pedantic' with STL and hence Qt.

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 bug because you haven't compiler I 
use.


	

Actual Results:  Compilation error.


Expected Results:  Succesfully built package.


Additional info:

I'll attach the patch which eliminates -ansi -pedantic from command line.
Comment 1 Sysoltsev Slawa 2002-12-02 10:16:14 EST
Created attachment 87044 [details]
Patch which removes -ansi -pedantic from command line
Comment 2 Ngo Than 2002-12-09 13:26:10 EST
kdevelop-2.1.4-2 has this fix. Thanks for the patch file

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