[BZ] bug in the g++ 4.7.2-5 compiler that is in the RH DTS v1.1

Solution Verified - Updated -

Issue

  • If compiled on RHEL 6 using the native compiler, it compiles fine:
[mymachine:346] c++ -v
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) 
[mymachine:347] /usr/bin/c++ funcptrtmplarg.C -o it.o
  • If compiled on RHEL 6 using a gcc 4.8.1 that I just built, it compiles fine:
[mymachine:348]
/wv/cst5/cst_projects/evelyn/gcc-4.8.1/install/H-x86_64-rhel6-linux-gnu/bin/c++
funcptrtmplarg.C -o it.o
  • But if you compile on RHEL 6 using the RH DTS it generates a bogus error:
[mymachine:349] /opt/rh/devtoolset-1.1/root/usr/bin/c++ funcptrtmplarg.C -o it.o
funcptrtmplarg.C: In instantiation of ‘class A<int, double>’:
funcptrtmplarg.C:86:18:   required from here
funcptrtmplarg.C:79:40: error: could not convert template argument ‘&A<int,
double>::increment’ to ‘void (A<int, double>::*)(A<int, double>::B&)’
funcptrtmplarg.C:80:40: error: could not convert template argument ‘&A<int,
double>::decrement’ to ‘void (A<int, double>::*)(A<int, double>::B&)’

Environment

  • Red Hat Enterprise Linux 6.3
  • Red Hat Developer Tool Set 1.1
  • Red Hat Developer Tool Set 2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content