ROOT: rootcint producing uncompilable output

From: Robert Hatcher <rhatcher_at_fnal.gov>
Date: Fri, 14 Aug 2009 17:51:28 -0500


Recent the SVN HEAD version of ROOT (on Linux) has been generating rootcint output that can't be compiled under gcc v3.4.3. The problematic
bit is the existence of "::void*" in the source. If this is changed to simply "void*" then the rootcint output compiles.

The source:



class FluxGenerator;

class EvtKinFactory {

public:

     /// pointer to function creating FluxGenerator
     typedef FluxGenerator*        (*FluxCreator)();

private:
     /// map of creator function pointers keyed by name
     typedef std::map<std::string, FluxCreator>        CallbackMapFlux;

     CallbackMapFlux        fFluxCallbacks;

};


Produces PackageCint.cc that contains:


       #if !(defined(R__ACCESS_IN_SYMBOL) || defined (R__USE_SHADOW_CLASS))

       typedef ::EvtKinFactory EvtKinFactory;
       #else
       class EvtKinFactory  {
          public:
          //friend XX;
          typedef void* (*FluxCreator)() ;
           

typedef ::std::map< ::string, ::void*, ::less< ::string>, ::allocator< : :pair<const ::string, void* > > > CallbackMapFlux;

          CallbackMapFlux fFluxCallbacks; //
       };
       #endif

Which when compiled generates the errors:



<**compiling**> EventKinematicsCint.cc
BLAH/EventKinematicsCint.cc:78: error: missing `>' to terminate the template ar\
gument list
BLAH/EventKinematicsCint.cc:78: error: template argument 2 is invalid
BLAH/EventKinematicsCint.cc:78: error: template argument 4 is invalid
BLAH/EventKinematicsCint.cc:78: error: expected unqualified-id before  
',' token
BLAH/EventKinematicsCint.cc:78: error: ISO C++ forbids declaration of `type name' with no type
BLAH/EventKinematicsCint.cc:78: error: `less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >' specified as declarator-id
BLAH/EventKinematicsCint.cc:78: error: two or more data types in declaration of `less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >'

Robert W. Hatcher | rhatcher_at_fnal.gov 630-840-3102 FNAL CD/REX (MINOS) | MS 220, PO Box 500, Batavia IL 60510 Received on Sat Aug 15 2009 - 00:51:56 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 15 2009 - 17:50:02 CEST