GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Improve documentation and example for building Modula-2 shared libraries.

The documentation and example code for building shared libraries with Modula-2 have been updated and improved, including a new test case.

The documentation for building shared libraries with Modula-2 has been improved with a clearer description and more complete example code. This change also adds a new test case to verify the functionality of calling Modula-2 code from C++. This enhancement makes it easier for developers to create and use shared libraries with Modula-2, promoting better interoperability with other languages.

In Details

This commit addresses PR modula2/120189 by rewriting the description of shared library creation in doc/gm2.texi and including complete example code. It also adds a new test case (gm2/examples/cppcallingm2/run/pass/) to verify that C++ code can call Modula-2 code. This change improves the documentation and provides a working example for developers using the Modula-2 compiler.

For Context

Modula-2 is a procedural programming language known for its modularity and strong typing. Shared libraries allow code to be reused by multiple programs, reducing code duplication and promoting modular design. This commit focuses on improving the documentation and providing a practical example of how to build shared libraries using Modula-2. The updated documentation and example are intended to simplify the process of creating and using Modula-2 shared libraries, particularly when integrating with code written in other languages like C++.

Filed Under: modula2documentationshared libraryinteroperability