This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about a template method


I'm posting this question on behalf of someone else so I apologize if there
isn't enough information.

Pasted question starts here.

Although this problem is a bit difficult to describe in an e-mail, it
appears that the following templated method no longer compiles: (previously
compiled with 2.7.2-960126)

template <class T> void OsrpStats<T>::IncrCountRx(uint8 type) 
{
if (T::MAX_TYPES == (T::MsgType)type)
{
return;
}
mpCountRx[type]++;
}

The compiler complains about the type cast (T::MsgType). The surprising part
about this problem is that it is not sufficient to simply remove the type
cast, but it is also necessary to supply the following
compiler option:

-Wc, -fno-implicit-templates

Does this change make sense, or am I missing something?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]