Bug 49799 - <sstream> produces warning when compiled with -Wall
Summary: <sstream> produces warning when compiled with -Wall
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-24 00:25 UTC by Wagner T. Correa
Modified: 2007-04-18 16:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-01 15:40:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Wagner T. Correa 2001-07-24 00:25:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686)

Description of problem:
If you include <sstream> in a C++ program and compile it with -Wall, you
will
get the following warning:

/usr/include/g++-3/sstream: In method `int stringbuf::sync ()':
/usr/include/g++-3/sstream:171: warning: comparison between signed and
unsigned integer expressions


How reproducible:
Always

Steps to Reproduce:
Simply try including <sstream> from a C++ file, and compile it with g++
-Wall -c.

Actual Results:  You will get the above warning.

Expected Results:  I'd expect the standard header files to be warning-free.

Additional info:

gcc-2.96-85

Comment 1 Jakub Jelinek 2001-07-24 09:32:00 UTC
Will be fixed in libstdc++-devel-2.96-95.

Comment 2 Wagner T. Correa 2001-11-07 07:23:06 UTC
I've upgraded my system, and now I'm running libstdc++-devel-2.96-98.  The
original warning is gone, but new ones have been introduced:

/usr/include/g++-3/sstream:260: warning: default argument given for parameter 3
of `streampos 
stringbuf::seekoff (long long int, ios::seek_dir, int = 3)'
/usr/include/g++-3/sstream:83: warning: after previous specification in 
`streampos stringbuf::seekoff (long long int, ios::seek_dir, int = 3)'
/usr/include/g++-3/sstream: In method `streampos stringbuf::seekoff 
(long long int, ios::seek_dir, int)':
/usr/include/g++-3/sstream:260: warning: declaration of `mode' shadows a member
of `this'
/usr/include/g++-3/sstream: At top level:
/usr/include/g++-3/sstream:278: warning: default argument given for parameter 2
of `streampos 
stringbuf::seekpos (long long int, int = 3)'
/usr/include/g++-3/sstream:84: warning: after previous specification in 
`streampos stringbuf::seekpos (long long int, int = 3)'
/usr/include/g++-3/sstream: In method `streampos stringbuf::seekpos 
(long long int, int)':
/usr/include/g++-3/sstream:278: warning: declaration of `mode' shadows a member
of `this'

Comment 3 Wagner T. Correa 2002-08-07 07:52:48 UTC
The bug still exists on libstdc++-devel-2.96-108.7.2.


Comment 4 Benjamin Kosnik 2004-10-01 15:40:15 UTC
Fixed in gcc-3.2, gcc-3.3, gcc-3.4.




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