Bug 76001 - gcc error: cannot convert `_G_fpos64_t' to `streampos'
Summary: gcc error: cannot convert `_G_fpos64_t' to `streampos'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-15 17:29 UTC by Eric McRae
Modified: 2016-11-24 14:53 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-04-22 07:22:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Eric McRae 2002-10-15 17:29:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.18-10 i686)

Description of problem:
I have gcc 2.96 and glibc-*2.2.5-40 installed.  I cannot compile even a simple
C++ hello world without the following error.
[eric@luna ~]$ g++ hello.cc
In file included from /usr/include/g++-3/iostream.h:31,
                 from hello.cc:1:
/usr/include/g++-3/streambuf.h: In method `streampos 
streambuf::pubseekoff (long long int, ios::seek_dir, int)':
/usr/include/g++-3/streambuf.h:362: cannot convert `_G_fpos64_t' to 
`streampos' in return
/usr/include/g++-3/streambuf.h: In method `streampos 
streambuf::pubseekpos (long long int, int)':
/usr/include/g++-3/streambuf.h:364: conversion from `streampos' to 
non-scalar type `_G_fpos64_t' requested


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. upgrade gcc to 2.96
2. upgrade glibc to 2.2.5-40 (glibc-devel-2.2.5-40, glibc-2.2.5-40,
glibc-common-2.2.5-40, glibc-utils-2.2.5-40 )
3. Create the following file as hello.cc.
#include <iostream.h>

main()
{
    cout << "Hello World!" << endl;
}
4. compile this file with gcc hello.cc
	

Actual Results:  See description

Expected Results:  successful compile

Additional info:

I have seen commentary on the net that a compatibility patch is needed for glibc
to work with gcc versions older than 3.2.  Since you are providing gcc 2.96, I
think a patch is needed - particularly for /usr/include/_G_config.h.

Comment 1 Alan Cox 2002-12-16 01:31:16 UTC
Checks out OK in 8.0/gcc 3.2


Comment 2 Ulrich Drepper 2003-04-22 07:22:32 UTC
You didn't use the correct libg++/libstdc++ code.   There is in any case no
problem with RHL8 and especially RHL9 since the C++ library is completely
different.  Closing as NOTABUG.


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