# 標準Cは実在しない言語？ GCCとClangの非互換性を暴く

Original title: Your C is not standard C

> Hacker News story 50071546 · language: ja · submitted 2026-10-13
> Web version: https://zeli.app/ja/story/50071546
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 133 · by [dverlaeckt80](<https://news.ycombinator.com/user?id=dverlaeckt80>) · 💬 111
[original](<https://sebsite.pw/w/20261012-notstdc.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50071546>)

## Summary

標準Cと現実のC（GCC/Clang + glibc/musl）の非互換性を列挙。asmが予約語でないためデフォルトでコンパイルエラーになる点、FLT_ROUNDSが実行時の丸めモードを反映しない点、C99から27年経ってもGCCが標準プラグマを無視する点、glibcのinitstateがPOSIXに反しNULLを返さない点、Clangが関数戻り値の修飾子を誤って扱う点、muslのva_startがC23の省略引数に対応しない点などを指摘。標準規格と実装の乖離を浮き彫りにする。

## Key quote

> 委員会は、誰も実際には使えない、使うことのない非現実的な言語を作り出した。

## HN discussion (111 comments)

### [omoikane](<https://news.ycombinator.com/item?id=50098442>)

> GCCが今も標準のプラグマを実装していないのを見ると、昔のGCCのプラグマのイースターエッグを思い出す。これはgcc 0.9のcccp.cにあるんだ：
>
> /*
>
> \* the behavior of the #pragma directive is implementation defined.
>
> \* this implementation defines it as follows.
>
> */
>
> do_pragma ()
>
> {
>
> close (0);
>
> if (open ("/dev/tty", O_RDONLY) != 0)
>
> goto nope;
>
> close (1);
>
> if (open ("/dev/tty", O_WRONLY) != 1)
>
> goto nope;
>
> execl ("/usr/games/hack", "#pragma", 0);
>
> execl ("/usr/games/rogue", "#pragma", 0);
>
> execl ("/usr/new/emacs", "-f", "hanoi", "9", "-kill", 0);
>
> execl ("/usr/local/emacs", "-f", "hanoi", "9", "-kill", 0);
>
> nope:
>
> fatal ("You are in a maze of twisty compiler features, all different");
>
> }
>
> gcc 1.21までには消えている：
>
> \#if 0
>
> /* This was a fun hack, but #pragma seems to start to be useful.
>
> By failing to recognize it, we pass it through unchanged to cc1.  */
>
> ...
>
> \#endif

### [MisterTea](<https://news.ycombinator.com/item?id=50079442>)

> Plan 9 Cを書くのが大好きで楽しんでいる者として言えるのは、「標準C」なるものは、今となっては何を意味するのか分からないが、とにかくめちゃくちゃだということだ。挙げればきりがないが、唯一のオープンソースコンパイラ2つが肥大化した怪物であることから、C99以降の追加は無意味、インラインasmは移植性を台無しにし*、POSIXは地獄に落ちろ（タイプライター端末も一緒に）といったところだ。
>
> C委員会に所属している友人がいるが、すでに実装されたり、これから実装される予定の悪いアイデアの数々に嫌気がさして、おそらく辞めるだろう。
>
> \* いや、ソースファイル中に醜い#ifdefを何百万もばらまくのは気持ち悪いし読みにくい。コードを分割しろよ、まったく。

### [dzaima](<https://news.ycombinator.com/item?id=50098144>)

> \> gccは常にFLT_ROUNDSを1と定義する
>
> まあ、gccはFENV_ACCESSプラグマをサポートしていないし、そのためfesetroundの呼び出しはすべて常に未定義動作だから、丸めモードがデフォルトから決して変わらないかのように振る舞うのは正当なんだよね :)

### [fooker](<https://news.ycombinator.com/item?id=50105459>)

> 言語標準の目的は循環している。つまり、それが存在し、矛盾がないことだ。
>
> コンパイラがその標準を実装するかどうかは、コンパイラ開発者と、おそらくそのユーザー次第だ。
>
> コードの移植性が何よりも重要だった時代には、これが大いに意味をなしたかもしれない。
>
> しかし今では、Rustがそうしているように、コンパイラとそのライブラリをその言語の標準とほぼみなすことができる。

### [Syzygies](<https://news.ycombinator.com/item?id=50098400>)

> ...そして私はGoが標準Cだと思っていたよ！

---

## Cite

- Page: https://zeli.app/ja/story/50071546
- Date: 2026-10-13
- Source: sebsite.pw (https://sebsite.pw/w/20261012-notstdc.html)
- Hacker News: https://news.ycombinator.com/item?id=50071546

## Other languages

- en: https://zeli.app/story/50071546 · markdown: https://zeli.app/story/50071546.md
- zh: https://zeli.app/zh/story/50071546 · markdown: https://zeli.app/zh/story/50071546.md
- ko: https://zeli.app/ko/story/50071546 · markdown: https://zeli.app/ko/story/50071546.md
- de: https://zeli.app/de/story/50071546 · markdown: https://zeli.app/de/story/50071546.md
- es: https://zeli.app/es/story/50071546 · markdown: https://zeli.app/es/story/50071546.md
- ru: https://zeli.app/ru/story/50071546 · markdown: https://zeli.app/ru/story/50071546.md
