Portability requirements of libgccjit++.h

Marc Nieper-Wißkirchen marc.nieper+gnu@gmail.com
Mon Jan 31 09:39:32 GMT 2022


The GCC project has the following portability requirements ([1]):

"The directories gcc, libcpp and fixincludes may use C++03. They may also
use the long long type if the host C++ compiler supports it. These
directories should use reasonably portable parts of C++03, so that it is
possible to build GCC with C++ compilers other than GCC itself. If testing
reveals that reasonably recent versions of non-GCC C++ compilers cannot
compile GCC, then GCC code should be adjusted accordingly. (Avoiding
unusual language constructs helps immensely.) Furthermore, these
directories *should* also be compatible with C++11."

Does this requirement apply to libgccjit++.h as well? The header file is
technically contained in the directory gcc. On the other hand, it is not
used when building GCC.

I am asking because I have found the C++11 nullptr keyword in the header
file.  Can we generally lift the requirements to C++11 as far as the C++
API for libgccjit is concerned?

As any user of libgccjit has access to a recent C++ compiler (because with
libgccjit, there comes gcc), I would be very much in favor of lifting this
requirement so that further developments of the API can use C++11 features,
including parameter packs generalizing all the ad-hoc overloadings of
new_call in the current header.

Thanks,

Marc

--

[1] - https://gcc.gnu.org/codingconventions.html#Cxx_Language


More information about the Jit mailing list