Skip to content
Snippets Groups Projects
Commit c393dae4 authored by Axel Naumann's avatar Axel Naumann
Browse files

No #include <new> in C mode; add basic C mode test (ROOT-7090).

parent eef87776
No related branches found
No related tags found
No related merge requests found
...@@ -235,11 +235,14 @@ namespace cling { ...@@ -235,11 +235,14 @@ namespace cling {
if (External) if (External)
External->StartTranslationUnit(m_Consumer); External->StartTranslationUnit(m_Consumer);
// <new> is needed by the ValuePrinter so it's a good thing to include it. if (m_CI->getLangOpts().CPlusPlus) {
// We need to include it to determine the version number of the standard // <new> is needed by the ValuePrinter so it's a good thing to include it.
// library implementation. // We need to include it to determine the version number of the standard
ParseInternal("#include <new>"); // library implementation.
CheckABICompatibility(m_CI.get()); ParseInternal("#include <new>");
// That's really C++ ABI compatibility. C has other problems ;-)
CheckABICompatibility(m_CI.get());
}
// DO NOT commit the transactions here: static initialization in these // DO NOT commit the transactions here: static initialization in these
// transactions requires gCling through local_cxa_atexit(), but that has not // transactions requires gCling through local_cxa_atexit(), but that has not
......
//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
// RUN: cat %s | %cling -x c | FileCheck %s
// Validate cling C mode.
int printf(const char*,...);
printf("CHECK 123\n"); // CHECK: CHECK 123
// fix value printing!
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment