Dear P.O.

> On 17 Aug 2026, at 23:01, P. O. Jonsson <[email protected]> wrote:
> 
> Re: [Oorexx-devel] Bump CMAKE_CXX_STANDARD to 17?
> 
> Dear Jean Louis,
> 
> I am 1000 km away from my machines and working with entirely different 
> things. Please give me a couple of days to see what versions of CMake we have 
> on all platforms and which ones we can/cannot upgrade, ok? I can work from 
> remote again but I have very little time on my hands.


Sure.


> 
> We should have a general discussion on what platforms we need to leave behind 
> not only with this change but also by the changes related to utf-8. Some 
> platforms (most importantly W7 and W8 but also the 32-bit platforms) fail 
> several of the tests already.


+1


> 
> On macOS we already have 100s if not 1000s of compiler warnings already; I 
> guess with this bump this will be even worse? We should really go after and 
> correct some of them, many seems to be typecasts that are no longer allowed 
> but I am no C++ programmer.
> 


Thanks for bringing this up.
Now, a (long) review, just sharing what I found.

The point 1 is for the developers.
These warnings are probably coming from the LTO phase, not from the normal 
compilation.
@Moritz, could you submit this ChatGPT review to Claude?
Mainly the last question/answer.
https://chatgpt.com/share/6a84039d-bca8-83eb-8771-7a080b26d4d5


The point 2 is for P.O..


Here, we have a "normal" number of warnings:

ooRexx-macOS10-X86_64-build     5 warnings
ooRexx-macOS15-X86_64-build     10 warnings
ooRexx-macOS26-M4-build         5 warnings
ooRexx-FreeBSD14-build          10 warnings
ooRexx-NetBSD10-build           2 warnings
ooRexx-OpenBSD7-build           7 warnings
ooRexx-OpenIndiana-build        2 warnings
ooRexx-OpenSuse15-build         2 warnings
ooRexx-RaspberryPiOS32-build    2 warnings
ooRexx-RaspberryPiOS64-build    2 warnings
ooRexx-Solaris11-build          2 warnungs
oorexx-ubuntu16-build           2 warnings
ooRexx-windows10_32-build       2 warnings
ooRexx-windows10_64-build       1 warning
ooRexx-windows11_32-build       2 warnings
ooRexx-windows11_64-build       1 warning
ooRexx-windows32-build          2 warnings
ooRexx-windows64-build          1 warning
ooRexx-windows7_32-build        2 warnings
ooRexx-windows7_64-build        1 warning
ooRexx-windows8_32-build        2 warnings
ooRexx-windows8_64-build        1 warning


Here, we have a bunch of new warnings after the concurrency rework:
warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

ooRexx-ArchLinux-build          around 60 warnings, segmentation fault
ooRexx-CentOS10-build           around 160 warnings
ooRexx-Controller-Ubuntu-build  around 80 warnings
ooRexx-Debian12-build           around 80 warnings
ooRexx-Fedora43-build           around 60 warnings
ooRexx-linux-aarch64-build      around 35 warnings
ooRexx-LinuxMint22-build        around 80 warnings
ooRexx-Manjaro-build            around 60 warnings, segmentation fault
ooRexx-Ubuntu22-build           around 70 warnings
ooRexx-Ubuntu24-build           around 80 warnings


This warning was already addressed, before the concurrency rework: 
search "writing 1 byte into a region" in the source code, found 24 comments 
like that:
// avoid warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
// (or similar) in gcc 12 and above, due to our RexxString char stringData[4]

Example of warning workaround in NumberStringClass.hpp:
    #ifdef HAVE_PRAGMA_GCC_STRINGOPOVERFLOW
    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-Wstringop-overflow"
    #endif
               *current++ = c;
    #ifdef HAVE_PRAGMA_GCC_STRINGOPOVERFLOW
    #pragma GCC diagnostic pop
    #endif


The macro HAVE_PRAGMA_GCC_STRINGOPOVERFLOW is not a standard GCC or C/C++ 
pre-defined macro.
It is a custom identifier defined by CMake. 

CMakeLists.txt
  message(STATUS "-- determine available pragmas --")
  check_c_source_compiles("void main() {
    #pragma GCC diagnostic ignored \"-Wstringop-overflow\"
    }" HAVE_PRAGMA_GCC_STRINGOPOVERFLOW FAIL_REGEX "warning")




Point 1

The strange thing is that the new warnings occur on lines already "protected" 
against these warnings:
After further investigation, it appears that these warnings are probably coming 
from the LTO phase, not from the normal compilation.


Build machine log of ooRexx-ArchLinux-build
[ 68%] Linking CXX shared library lib/librexx.so
lto-wrapper: warning: using serial compilation of 22 LTRANS jobs
    
/home/osboxes/workspace/ooRexx-ArchLinux-build/oorexxSVN/interpreter/classes/StringClass.cpp:1816:15:
 warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
     1816 |         *data = Utilities::toLower(*data);
          |               ^
    
/home/osboxes/workspace/ooRexx-ArchLinux-build/oorexxSVN/interpreter/classes/StringClass.hpp:817:10:
 note: at offset 20 into destination object 'stringData' of size 4
      817 |     char stringData[4];                      // Start of the string 
data part
          |          ^
    
 
StringClass.cpp, the line 1816 is already "protected":
    1810    // avoid warning: writing 1 byte into a region of size 0 
[-Wstringop-overflow=]
    1811    // (or similar) in gcc 12 and above, due to our RexxString char 
stringData[4]
    1812    #ifdef HAVE_PRAGMA_GCC_STRINGOPOVERFLOW
    1813    #pragma GCC diagnostic push
    1814    #pragma GCC diagnostic ignored "-Wstringop-overflow"
    1815    #endif
    1816            *data = Utilities::toLower(*data);
    1817    #ifdef HAVE_PRAGMA_GCC_STRINGOPOVERFLOW
    1818    #pragma GCC diagnostic pop
    1819    #endif

The log of ooRexx-ArchLinux-build shows the detection is ok:
-- -- determine available pragmas --
-- Performing Test HAVE_PRAGMA_GCC_STRINGOPOVERFLOW
-- Performing Test HAVE_PRAGMA_GCC_STRINGOPOVERFLOW - Success




Point 2

Regarding the two segmentation faults, they could be due to the GCC upgrade 
from 15.2.1 to 16.1.1.
Maybe GCC 16 is to avoid for the moment (1st stable release April 30, 2026)

ooRexx-ArchLinux-build
Last Success 2 mo 22 days
-- The C compiler identification is GNU 15.2.1
-- The CXX compiler identification is GNU 15.2.1
Last Failure 12 days (segmentation fault)
-- The C compiler identification is GNU 16.1.1
-- The CXX compiler identification is GNU 16.1.1

ooRexx-Manjaro-build
Last Success 2 mo 22 days
-- The C compiler identification is GNU 15.2.1
-- The CXX compiler identification is GNU 15.2.1
Last Failure 12 days (segmentation fault)
-- The C compiler identification is GNU 16.1.1
-- The CXX compiler identification is GNU 16.1.1



_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to