Skip to Main content Skip to Navigation
New interface
Reports (Research report)

Function failure annotation

Niall Douglas 1 Jens Gustedt 2 
2 CAMUS - Compilation pour les Architectures MUlti-coeurS
Inria Nancy - Grand Est, ICube - Laboratoire des sciences de l'ingénieur, de l'informatique et de l'imagerie
Abstract : We have been seeing an evolution in proposals for the best syntax for describing how to mark how a function fails, such that compilers and linkers can much better optimise function calls than at present. These papers were spurred by [WG21 P0709] Zero-overhead deterministic exceptions, which proposes deterministic exception handling for C++, whose implementation could be very compatible with C code. P0709 resulted in [WG21 P1095] Zero overhead deterministic failure-A unified mechanism for C and C++ which proposed a C syntax and exception-like mechanism for supporting C++ deterministic exceptions. That was responded to by [WG14 N2361] Out-of-band bit for exceptional return and errno replacement which proposed an even wider reform, whereby the most popular idioms for function failure in C code would each gain direct calling convention support in the compiler. This paper synthesises all of the proposals above into common proposal, and does not duplicate some of the detail in the above papers for brevity and clarity. It hews closely to what [WG14 N2361] proposes, but with different syntax, and in addition it shows how the corresponding C++ features can be constructed on top of it, without loosing call compatibility with C.
Complete list of metadata

Cited literature [3 references]  Display  Hide  Download
Contributor : Jens Gustedt Connect in order to contact the contributor
Submitted on : Thursday, October 10, 2019 - 10:36:30 PM
Last modification on : Saturday, November 5, 2022 - 3:58:30 AM


Files produced by the author(s)


Distributed under a Creative Commons Attribution 4.0 International License


  • HAL Id : hal-02311462, version 1


Niall Douglas, Jens Gustedt. Function failure annotation. [Research Report] N2429, ISO JCT1/SC22/WG14. 2019. ⟨hal-02311462⟩



Record views


Files downloads