<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq" -->

---
title: Why Git Has a Variable Named...
description: Git's source code contains a peculiarly named global variable `false_but_the_compiler_does_not_know_it_`, always initialized to 0 but never declared `const`...
canonical: https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why Git Has a Variable Named false_but_the_compiler_does_not_know_it | daily.dev
og:description: Git's source code contains a peculiarly named global variable `false_but_the_compiler_does_not_know_it_`, always initialized to 0 but never declared `const`...
og:url: https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq
og:image: https://api.daily.dev/og/posts/bOtWOBSOQ.png
og:image:alt: Why Git Has a Variable Named false_but_the_compiler_does_not_know_it
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.

# Why Git Has a Variable Named false_but_the_compiler_does_not_know_it

**[Confessions of a Code Addict](https://daily.dev/sources/codeconfessions)** · 11 min read · 8 upvotes · 2 comments

## Summary

Git's source code contains a peculiarly named global variable `false_but_the_compiler_does_not_know_it_`, always initialized to 0 but never declared `const` and defined in a separate translation unit. This prevents Clang's `-Wunreachable-code` warning from firing on code that is only unreachable in certain build configurations (e.g., when `NO_SYMLINK_HEAD` is defined and `create_ref_symlink` becomes a constant `-1`). The `NOT_CONSTANT` macro wraps expressions with this variable via logical OR, making the compiler unable to prove the condition is always false at compile time. Alternative approaches like `#ifdef` guards, `#pragma` suppression, `volatile`, or a stub function are discussed and compared. The post also explores whether link-time optimization (LTO) eliminates the dead branch — it does, giving Git both warning suppression during normal builds and dead-code elimination with LTO enabled.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.codingconfessions.com/p/false-but-the-compiler-does-not-know-it>

## Community discussion

Top comments from developers on daily.dev.

**@hanzo** · 1 upvotes

> Great article. I love how modern optimisation boils down to, 'According to the spec, your program invoked forbidden ancient magic, so we replaced your loop with demons'. Compilers are basically hostage negotiators for undefined behaviour.

## Similar posts on daily.dev

- [Branches in branch-free code](https://daily.dev/posts/branches-in-branch-free-code-trw8zoxp3) · Lobsters · 0 upvotes · 0 comments
- [How the GNU C Compiler became the Clippy of cryptography](https://daily.dev/posts/how-the-gnu-c-compiler-became-the-clippy-of-cryptography-w6spyzuh3) · The Register · 0 upvotes · 0 comments
- [The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library](https://daily.dev/posts/the-v8-javascript-runtime-undermined-my-constant-time-javascript-library-g9jlr7qsx) · Dhole Moments · 6 upvotes · 2 comments
- [The little bool of doom](https://daily.dev/posts/the-little-bool-of-doom-hyey32wf7) · Hacker News · 2 upvotes · 0 comments
- [The Double Engine: Why Every Modern C\+\+ Compiler Is Secretly Two Compilers](https://daily.dev/posts/the-double-engine-why-every-modern-c-compiler-is-secretly-two-compilers-f687ffzr4) · Medium · 5 upvotes · 0 comments

---

Tags: [#c](https://daily.dev/tags/c), [#git](https://daily.dev/tags/git), [#compiler-optimization](https://daily.dev/tags/compiler-optimization)

[View this post on daily.dev](https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq)

```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":"Why Git Has a Variable Named false_but_the_compiler_does_not_know_it","url":"https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq"},"datePublished":"2026-06-03T11:03:53.307Z","dateModified":"2026-06-07T17:51:01.518Z","description":"Git's source code contains a peculiarly named global variable `false_but_the_compiler_does_not_know_it_`, always initialized to 0 but never declared `const`...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed65a9512447cbb3b3b21d421539bac2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed65a9512447cbb3b3b21d421539bac2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Confessions of a Code Addict","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":"Confessions of a Code Addict","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/13e0f42f33864f94bf4d8f0e43234afd","url":"https://daily.dev/sources/codeconfessions"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"c,git,compiler-optimization","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Confessions of a Code Addict","item":"https://daily.dev/sources/codeconfessions"},{"@type":"ListItem","position":3,"name":"Why Git Has a Variable Named false_but_the_compiler_does_not_know_it"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/why-git-has-a-variable-named-false-but-the-compiler-does-not-know-it-botwobsoq","comment":[{"@type":"Comment","text":"Great article. I love how modern optimisation boils down to, ‘According to the spec, your program invoked forbidden ancient magic, so we replaced your loop with demons’. Compilers are basically hostage negotiators for undefined behaviour.","datePublished":"2026-06-03T22:08:24.883Z","url":"https://daily.dev/posts/bOtWOBSOQ#c-1thuxNDqF","author":{"@type":"Person","name":"hanzo","url":"https://daily.dev/hanzo","image":"https://media.daily.dev/image/upload/s--vKizbc8n--/f_auto/v1777390310/avatars/avatar_SNpELuiA1OUL64g4ciFyI?_a=BAMAMiWQ0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

