Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 164806

Summary: g++4 does not work with system include file <limits> if -pedantic option is given
Product: Red Hat Enterprise Linux 4 Reporter: Elena Zannoni <ezannoni>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-677 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 11:18:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 157174    
Bug Blocks: 156322    

Description Elena Zannoni 2005-08-01 16:05:15 UTC
+++ This bug was initially created as a clone of Bug #157174 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
g++4 -D_Pm2_VERSION_=\"0.9-beta3\" -D_Pm2_USER_=\"roebel\" -I. -I../LibSrc   
-O3 -funroll-loops -pthread   -Wall  -pedantic    -o ../obj_/Pm2Sdif.o -c 
Pm2Sdif.cpp 
/usr/include/c++/3.4.3/limits:996: error: floating-point literal cannot appear 
in a constant-expression 
/usr/include/c++/3.4.3/limits:1009: error: field initializer is not constant 
/usr/include/c++/3.4.3/limits:1052: error: floating-point literal cannot 
appearin a constant-expression 
/usr/include/c++/3.4.3/limits:1065: error: field initializer is not constant 
/usr/include/c++/3.4.3/limits:1108: error: floating-point literal cannot 
appearin a constant-expression 
/usr/include/c++/3.4.3/limits:1122: error: field initializer is not constant 
/u/formes/share/include/sdif.h:251: warning: â_sdif_h_cvs_revision_â defined 
but not used 
m 

Version-Release number of selected component (if applicable):
gcc4-c++-4.0.0-0.41.fc3


How reproducible:
Always

Steps to Reproduce:
1. compile a c++ file that includes <limits> and give -pedantic option 
2. 
3. 
   

Actual Results:  see above 

Expected Results:  gcc 3.4 did compile! 

Additional info:

Comment 2 Red Hat Bugzilla 2005-10-05 11:18:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-677.html