You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We determine whether a .x'ed file is an unnamed macro. If it is, the
following procedure is executed.
Also, input from the prompt will go through this procedure.
we split input into statements using a custom lexer, and expose
(preprocess, parse, execute) cling to each of them one by one.
we find the next PP directive ('#...') in the input OR the end of
the script/input, preprocess the input in front of it, use a custom
lexer to split that input in front of the PP directive into statements,
and expose (parse, execute) cling to each of them one by one.
when we hit a preprocessor directive "as a statement" (i.e. right
after the end of a previous statement, but not inside a block):
#include, #define is passed to cling
#ifdef is evaluated (only top-level); we recurse on the expanded
block (likely a separate memory buffer) again splitting and evaluating
statements, continuing with the original buffer at the #endif
Cling might need (maybe functionally needed to not re-preprocess, maybe
just a performance improvement) an interface that does not preprocess
the input string.
The question is how it interacts with the usage of the CPP. For example
Activity
ferdymercury commentedon Jun 21, 2024
Another example:
If I uncomment the for loop, cling crashes.
tangentially related: https://its.cern.ch/jira/browse/ROOT-7033
dpiparo commentedon Oct 28, 2024
I can see that also with LLVM18
@devajithvs ?
guitargeek commentedon Nov 14, 2024
It doesn't crash anymore with ROOT master for me. And what Danilo is citing is a failed assertion, not a crash.
@ferdymercury, can you still reproduce the issue?
ferdymercury commentedon Nov 14, 2024
Yep, I can still reproduce the issue, in the sense that:
/.../merged.C:4:1: error: expected unqualified-idferdymercury commentedon Nov 19, 2024
This seems a duplicate of https://its.cern.ch/jira/browse/ROOT-8025 so I'd suggesting closing one or the other.
or
ferdymercury commentedon Apr 15, 2025
Another occurrence https://its.cern.ch/jira/browse/ROOT-5487:
We determine whether a .x'ed file is an unnamed macro. If it is, the
following procedure is executed.
Also, input from the prompt will go through this procedure.
Cling might need (maybe functionally needed to not re-preprocess, maybe
just a performance improvement) an interface that does not preprocess
the input string.
The question is how it interacts with the usage of the CPP. For example
or simpler
or
ferdymercury commentedon Jul 23, 2026
Still there with LLVM22
ferdymercury commentedon Jul 24, 2026
Seems the culprit is at
cling::utils::isUnnamedMacro, see bbab843[cling] preprocess source before deciding if script is unnamed macro
ferdymercury commentedon Aug 10, 2026
Would be fixed by #22915 (once some side effects are corrected)