Function failure annotation - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Reports (Research Report) Year : 2019

Function failure annotation


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.
Fichier principal
Vignette du fichier
n2429.pdf (317.34 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-02311462 , version 1 (10-10-2019)




  • HAL Id : hal-02311462 , version 1


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


Gmail Facebook X LinkedIn More