Skip to content

The interfacing from C to Ada section should talk about adainit and adafinal #906

Description

@ButcherAdaCore

Recently we've had the scenario of an AdaCore engineer (relatively new to Ada) trying to invoke an Ada library from a C main and the engineer couldn't figure out why there was uninitialised data. For anyone new to Ada the concept of elaboration and the runtime mechanics of how it actually works (the encapsulation of the calls makes it appear to just happen by magic!) can be non-intuitive. It feels to me like something that could also cause external engineers to trip up and therefore should be included in basic tutorials, or at least mentioned with a reference to the relevant section on an advanced course.

https://learn.adacore.com/courses/intro-to-ada/chapters/interfacing_with_c.html#calling-ada-subprograms-in-c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions