Problem 847 - Bad inline declaration in G4FieldManager.hh
Summary: Bad inline declaration in G4FieldManager.hh
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/magneticfield (show other problems)
Version: 7.1
Hardware: All All
: P2 normal
Assignee: John Apostolakis
URL:
Depends on:
Blocks:
 
Reported: 2006-03-03 08:12 CET by marcus.h.mendenhall
Modified: 2006-05-22 13:34 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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.