Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[cxxmodules] Undef I again (partly reverts 1847320)
In commit 1847320 we remove the code that undefs I
which breaks some tests since we now again export macros
from the STL module.
  • Loading branch information
Teemperor committed Nov 28, 2017
commit dfe40ddd1225113526720a2ee3f1bb90846ee429
9 changes: 8 additions & 1 deletion core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,14 @@ static void LoadCoreModules(cling::Interpreter &interp)

// Check that the gROOT macro was exported by any core module.
assert(interp.getMacro("gROOT") && "Couldn't load gROOT macro?");
>>>>>>> [cxxmodules] Fixed macro loading in LoadModule

// C99 decided that it's a very good idea to name a macro `I` (the letter I).
// This seems to screw up nearly all the template code out there as `I` is
// common template parameter name and iterator variable name.
// Let's follow the GCC recommendation and undefine `I` in case any of the
// core modules have defined it:
// https://www.gnu.org/software/libc/manual/html_node/Complex-Numbers.html
interp.declare("#ifdef I\n #undef I\n #endif\n");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vgvassilev I reply here to your comment on the closed PR. I don't think we call recursively LoadCoreModule or recursively make TCling instances? And if we do, then we already made a good portion of declares before this code for all the other TCling things, so we would anyway be in deep trouble.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we ought to reduce all declares in TCling and that seems to be an easy-to-reduce one.

}

static bool FileExists(const char *file)
Expand Down