Problem 847

Summary: Bad inline declaration in G4FieldManager.hh
Product: Geant4 Reporter: marcus.h.mendenhall
Component: geometry/magneticfieldAssignee: John Apostolakis <John.Apostolakis>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.1   
Hardware: All   
OS: All   

Description marcus.h.mendenhall 2006-03-03 08:12:39 CET
I get the following error when compiling Geant4.7 and 4.8 code using fields on PPC platforms (MacOSX
and Linux-PPC64 using gcc.

geant4.8.0/include/G4FieldManager.hh:93: warning: inline function `const G4ChordFinder*
G4FieldManager::GetChordFinder() const' used but never defined

It traces to a pair of inline declarations in the file, one of which really corresponds to a function in the
G4FieldManager.icc, the other of which doesn't.  For some reason, gcc on x86 manages to to ignore the
bad declaration, but the gcc on ppc cannot.  Here is the snippet showing the error:

     inline void     SetChordFinder(G4ChordFinder *aChordFinder);
 ***bad line, this does not exist in the icc file ***    inline G4ChordFinder*  GetChordFinder();
     inline const G4ChordFinder*  GetChordFinder() const;
        // Create, set or get the associated Chord Finder

Commenting out or removing the line fixes the problem, since the one which is declared 'const' is the
right declaration.
Comment 1 John Apostolakis 2006-04-04 07:55:59 CEST
Dear Marcus,

Thanks for the report.  I am correcting it, and it will be included in the next
relevant patch or release.

Best regards,
John.
Comment 2 John Apostolakis 2006-05-22 13:34:59 CEST
Fix is included in accepted tags - is scheduled to be part of the next release.