GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » compilation of macros
Re: compilation of macros [message #9842 is a reply to message #9840] Wed, 02 December 2009 19:57 Go to previous messageGo to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
Hi,

The order of includes should not make any difference. The Joke is if one order the includes from local to global this will help identifying such cases. i.e. one get an error if the header depends on a standard (or local) header but doesn't itself #include that header.

And that was the case here. If the PndDrc.h was included first then the compiler will find the error, but the facts that
1. the header was never used directly (tell Bertram tried to compile the macro!)
2. the PndDrcGeo.h was included in the cxx file before the PndDrc.h

make this situation.

So it is a good Joke.

Quote:

what about cleaning up all header files?


This would be great, but we cannot do this all the time ourselves, the people writing code should also take care of there own code, and following such jokes as the one here will help all to find such situations more easily.

So one can consider this issue of include order as a convention or an advice (or a Joke!) and the fact that C++ does not forbid this or even care about it allow us to ask for it.

regards

Mohammad




 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TPC geant4
Next Topic: Small bug with cmake/config.sh
Goto Forum:
  


Current Time: Sun Dec 05 12:23:41 CET 2021

Total time taken to generate the page: 0.02272 seconds