<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol" -->

---
title: Real-time Safety — Guaranteed by the Compiler! - Anders...
description: Clang 20 introduces function effect analysis and real-time sanitizer to enforce real-time safety constraints at compile-time and runtime. The...
canonical: https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025 | daily.dev
og:description: Clang 20 introduces function effect analysis and real-time sanitizer to enforce real-time safety constraints at compile-time and runtime. The...
og:url: https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol
og:image: https://api.daily.dev/og/posts/Ixf7gzTOL.png
og:image:alt: Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025

**[NDC Conferences](https://daily.dev/sources/ndc)** · 63 min read · 0 upvotes · 0 comments

## Summary

Clang 20 introduces function effect analysis and real-time sanitizer to enforce real-time safety constraints at compile-time and runtime. The `[[clang::nonblocking]]` and `[[clang::nonallocating]]` attributes prevent functions from blocking on locks, allocating memory, or throwing exceptions. These constraints are transitive and support inference for templates and lambdas. Challenges include handling third-party code (requiring pragma-based opt-outs), type erasure with std::function (necessitating custom implementations), and retrofitting existing codebases. The approach works best with procedural code and requires compiler support (Clang 20+, Apple Clang 17+).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=IEgn25DzEMM>

## Similar posts on daily.dev

- [Defer available in gcc and clang](https://daily.dev/posts/defer-available-in-gcc-and-clang-2as4i32ce) · Lobsters · 8 upvotes · 1 comments
- [C\+\+26: Reflection, Memory Safety, Contracts, and a New Async Model](https://daily.dev/posts/c-26-reflection-memory-safety-contracts-and-a-new-async-model-qkor2ctht) · InfoQ · 18 upvotes · 2 comments
- [Compiler-Based Context & Locking Analysis On Deck For Linux 7.0 Paired With Clang 22\+](https://daily.dev/posts/compiler-based-context-locking-analysis-on-deck-for-linux-7-0-paired-with-clang-22--v9ur5wpa0) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#c++](https://daily.dev/tags/c++), [#compiler](https://daily.dev/tags/compiler), [#embedded](https://daily.dev/tags/embedded), [#real-time-systems](https://daily.dev/tags/real-time-systems)

[View this post on daily.dev](https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025","url":"https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol"},"datePublished":"2026-01-13T10:12:45.224Z","dateModified":"2026-03-30T02:18:22.977Z","description":"Clang 20 introduces function effect analysis and real-time sanitizer to enforce real-time safety constraints at compile-time and runtime. The...","image":"https://i.ytimg.com/vi/IEgn25DzEMM/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/IEgn25DzEMM/sddefault.jpg","isAccessibleForFree":true,"articleSection":"NDC Conferences","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NDC Conferences","logo":"https://media.daily.dev/image/upload/s--SiIyojEj--/f_auto/v1748760369/logos/ndc","url":"https://daily.dev/sources/ndc"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/real-time-safety-guaranteed-by-the-compiler---anders-schau-knatten---ndc-techtown-2025-ixf7gztol","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,compiler,embedded,real-time-systems","timeRequired":"PT63M","video":{"@type":"VideoObject","name":"Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025","description":"Clang 20 introduces function effect analysis and real-time sanitizer to enforce real-time safety constraints at compile-time and runtime. The...","thumbnailUrl":"https://i.ytimg.com/vi/IEgn25DzEMM/sddefault.jpg","uploadDate":"2026-01-13T10:12:45.224Z","duration":"PT63M","url":"https://api.daily.dev/r/Ixf7gzTOL","embedUrl":"https://www.youtube.com/embed/IEgn25DzEMM"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NDC Conferences","item":"https://daily.dev/sources/ndc"},{"@type":"ListItem","position":3,"name":"Real-time Safety — Guaranteed by the Compiler! - Anders Schau Knatten - NDC TechTown 2025"}]}
```

