Skip to content

Conversation

@guitargeek
Copy link
Contributor

Remove the headers ccomplex, cstdalign, cstdbool, and ctgmath from the module maps. They are deprecated since C++17 and should not be included anymore by ROOT or its users, as C++17 is the minimum supported C++ standard.

This fixes build warnings that can be seen in the CI when building with GCC 15, for example on Fedora 42:

[ 47%] Generating G__Core.cxx, ../lib/Core.pcm
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ccomplex:51:4: warning: "<ccomplex> is deprecated in C++17, use <complex> instead" [-W#warnings]
 # warning "<ccomplex> is deprecated in C++17, use <complex> instead"
   ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:23:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdalign:50:6: warning: "<cstdalign> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdalign> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:25:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdbool:50:6: warning: "<cstdbool> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdbool> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:30:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ctgmath:50:6: warning: "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead" [-W#warnings]
 #   warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead"

Remove the headers `ccomplex`, `cstdalign`, `cstdbool`, and `ctgmath`
from the module maps. They are deprecated since C++17 and should not be
included anymore by ROOT or its users, as C++17 is the minimum supported
C++ standard.

This fixes build warnings that can be seen in the CI when building with
GCC 15, for example on Fedora 42:

```txt
[ 47%] Generating G__Core.cxx, ../lib/Core.pcm
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ccomplex:51:4: warning: "<ccomplex> is deprecated in C++17, use <complex> instead" [-W#warnings]
 # warning "<ccomplex> is deprecated in C++17, use <complex> instead"
   ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:23:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdalign:50:6: warning: "<cstdalign> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdalign> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:25:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdbool:50:6: warning: "<cstdbool> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdbool> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:30:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ctgmath:50:6: warning: "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead" [-W#warnings]
 #   warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead"
```
@guitargeek guitargeek self-assigned this Jan 4, 2026
@guitargeek guitargeek requested a review from bellenot as a code owner January 4, 2026 10:26
@guitargeek guitargeek requested a review from dpiparo as a code owner January 4, 2026 10:26
@guitargeek guitargeek added the clean build Ask CI to do non-incremental build on PR label Jan 4, 2026
@dpiparo dpiparo requested review from devajithvs and hahnjo January 4, 2026 10:34
@dpiparo
Copy link
Member

dpiparo commented Jan 4, 2026

I added @hahnjo and @devajithvs to the reviewers.

This is done to make the ruff linter happy.
@guitargeek
Copy link
Contributor Author

Thanks! Note that there is one more warning about a non-standard header in C++20, but I don't know what we can do about that since still have to support C++17:

While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:12:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ciso646:49:6: warning: "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" [-W#warnings]
#    warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros"

Can we also do something about that?

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Test Results

    22 files      22 suites   3d 18h 25m 2s ⏱️
 3 790 tests  3 788 ✅ 0 💤 2 ❌
80 293 runs  80 291 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 4782571.

)

# treat this deprecated headers in a special way
stlDeprecatedHeadersList = ["strstream"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
stlDeprecatedHeadersList = ["strstream"]
stlDeprecatedHeadersList = ["strstream", "ciso646"]

maybe this could help?
(Not sure if strstream can be removed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:C++ modules in:Cling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants