Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 5039

Summary: Support need GCC in
Product: [Retired] Red Hat Linux Reporter: rkatti
Component: egcsAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: rkatti
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-09-10 15:29:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description rkatti 1999-09-10 08:05:48 UTC
Hello,

I have been using the following on my Red Hat linux 6.0
Intel machine :-
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I have a problem in compiling the following C++ program
containing template code on this version of the compiler.
It is A BUG IN THIS version of compiler.

The program is as follows :-

-----------------------------------------------------
#include  <stdio.h>
#include <stdlib.h>

class Dummy {

 int i;
};

template < class X >
class Array {
int i;
public :
static void * operator new(size_t ) ;
};

void * Array<Dummy>::operator new(size_t  i) {
printf ("\n new of Dummy ");
return (void *)malloc(i);
}

template <class X> void * Array<class X>::operator
new(size_t  i) {
printf ("\n new of X");
return (void *)malloc(i);
}

Array<Dummy> *a;
Array<int> *i;

int main () {

a = new Array<Dummy>;
i = new Array<int>;

return 0;
}


-----------------------------------------------------

This program gets compiled on the older version of compiler
but on the newer version it gives the following
error message :-
 " c.cxx:15: template-id `operator new<>' for
`Array<Dummy>::operator
new<>(size_t)' does not match any template declaration "


 But, this bug is FIXED on "GCC 2.95.1". I checked
this by downloading the source code of GCC-2.95.1 and
building the compiler on my machine.

 Could you please suggest me the egcs-rpm-number or patch
that contains the fix. Also please, let me know the
source from where I could dowload this patch/rpm.


Regards,
Raghvendra Katti

Comment 1 Jim Kingdon 1999-09-10 15:29:59 UTC
We do not expect to be providing a GCC 2.95.x RPM any time soon.
While 2.95.x does contain many C++ fixes, it also is binary
incompatible for C++ and has many problems on the Alpha.