Using GCC's nested functions with wide pointers and no trampolines
The article discusses the use of nested functions in GCC with wide pointers and without trampolines. It highlights the advantages of nested functions for accessing local state and the challenges posed by traditional trampoline implementations. The author proposes alternative solutions using wide pointers and function descriptors to improve efficiency and security.
- ▪Nested functions are useful for writing kernels that can access local state without needing to pass it as a void pointer.
- ▪GCC supports nested functions as an extension but traditionally uses trampolines, which can lead to security issues.
- ▪The article suggests using wide pointers or function descriptors as alternatives to improve performance and avoid memory leaks.
Hacker News (Newest) files mainly under programming. We currently carry 5,306 of its stories.
Story provenance
Source · retrieval · rights · ranking — open for full record
inspect →
Story provenance
Attribution is not the same as permission. This drawer separates discovery metadata, excerpts, WeSearch-generated summaries, reuse status, and whether the publisher receives the visit. Nothing here claims a legal grant the publisher has not made.
Record
| Original publisher | Codeberg |
| Canonical URL | https://uecker.codeberg.page/2026-01-06.html |
| Publication time | Fri, 29 May 2026 08:42:05 +0000 |
| Retrieval time | 2026-05-29T08:49:59.808Z |
| Last seen | 2026-05-29T08:49:59.808Z |
| Headline source | Publisher (no WeSearch rewrite) |
| Excerpt source | publisher body |
| Excerpt method | First ~120 words (~800 chars) of extracted publisher body, fair-use limited. |
| Summary | WeSearch · cerebras-chat (WeSearch summarizer) |
| Summary source text | contentText |
| Citation coverage | Summary is a WeSearch-generated derivative; primary citation is the original publisher URL. |
| Cluster | 8IkLAHSIhHSa |
| Cluster logic | Grouped by semantic title/content similarity across sources within a rolling window. Same-publisher template collisions are excluded from coverage comparison. |
| Ranking reason | Story pages are not engagement-ranked. Hub feeds use recency, with optional source-diversified chronological ordering (cap consecutive stories per source). No personalized ranking. |
| Publisher visit | Yes — open original |
| Substitutes article? | No — link-out required for full text |
Rights status (four layers)
WeSearch handling by dimension
| Indexing | May the item be indexed (stored, ranked, made findable)? | Allowed |
| Snippet | May a short excerpt of the publisher's text be shown? | Allowed |
| AI summary | May WeSearch generate its own short summary of the article? | Limited |
| Retrieval / RAG | May the content be exposed for third-party retrieval-augmented generation? | Not asserted |
| Model training | May the content be used to train AI models? | Not asserted |
| Commercial reuse | May the content be reused commercially? | Not permitted |
Basis: Derived from the published RSS/Atom feed. Contact: [email protected]. Reviewed: 2026-07-24.
Opening excerpt (first ~120 words) tap to expand
hljs.initHighlightingOnLoad(); Using GCC's Nested Functions with Wide Pointers and no Trampolines Martin Uecker, 2026-01-06 Introduction Nested functions are extremely useful, which is why basically any computer language since ALGOL60 has them. Except C. In particular, nested functions are useful to write kernels for passing them to higher-order functions. The kernels can access local state, and this is important because it then does not have to be passed as a void pointer to the higher-order function. void tree_increase_all(tree(int) *t, int increment) { void update(int *value) { (*value) += increment; } tree_walk(t, update); } For very simply nested functions it makes also sense to use a lambda expression, i.e. an anonymous nested function.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Codeberg.