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]

Confusing errormessage with implicit typename


Hi!

This is my first posting to the list, if I made something wrong please
tell me!

Here's my problem:
Look at this peace of code:

----------8<-------------------snapp------------------------>8----------
typedef std::map<IdentifierType, ObjectCreator> CreationCallbackMap;
typedef CreationCallbackMap::iterator CreationCallbackMapIter; 
   // ^^^^^ Here the keyword 'typename' is missing
----------8<-------------------snipp------------------------>8----------

gcc 3.4.1 told me the following:

----------8<-------------------snapp------------------------>8----------
/home/pavnic/projects/converter/src/utilities/factory.h:151: error: type
`std::map<IdentifierType, ObjectCreator, std::less<IdentifierType>,
std::allocator<std::pair<const IdentifierType, ObjectCreator> > >' is
not derived from type
`Crazy_::Utilities_::ObjectFactory<AbstractProduct, ObjectCreator,
IdentifierType>' 
----------8<-------------------snipp------------------------>8----------

After a diskusion on usenet I found out that gcc 3.2 produces a more
readable message, though it's "only" a warning. Here is it:

----------8<-------------------snapp------------------------>8----------
/home/pavnic/projects/converter/src/utilities/factory.h:151: warning:
`typename  
   std::map<IdentifierType, ObjectCreator, std::less<IdentifierType>, 
   std::allocator<std::pair<const IdentifierType, ObjectCreator> >
>::iterator'  
   is implicitly a typename
/home/pavnic/projects/converter/src/utilities/factory.h:151: warning:
implicit typename is deprecated, please see the documentation for
details 
----------8<-------------------snipp------------------------>8----------

I don't know if there are other examples where errormessages got a
little bit wors in the 3.4x relaase. Maybe it is possible to make gcc
producing more readable errormessases.

Best regards,
Nicolas

P.S. I don't know how difficult it is to change such things, so please
don;t flame me :-)!
-- 
|     Nicolas Pavlidis       |       Elvis Presly:    |\ |__      |
|   Student of SE  & KM      |      "Into the goto"   | \|__|     |
|  pavnic@sbox.tugraz.at     |       ICQ #320057056      |        |
|-------------------University of Technology, Graz----------------|


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