]> Sergey Matveev's repositories - stargrave-blog.git/commitdiff
Бага в одной из первых версий GCC
authorSergey Matveev <stargrave@stargrave.org>
Tue, 7 Apr 2020 07:26:01 +0000 (10:26 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 7 Apr 2020 07:26:01 +0000 (10:26 +0300)
Когда-то давно в C стандарт была введена "#pragma". Так как официально
её поведение было не определённым, то GCC на полном серьёзе в
документации и коде имел:

    The "#pragma" command is specified in the ANSI standard to have an
    arbitrary implementation-defined effect. In the GNU C preprocessor,
    "#pragma" first attempts to run the game "rogue"; if that fails, it
    tries to run the game "hack"; if that fails, it tries to run GNU
    Emacs displaying the Tower of Hanoi; if that fails, it reports a
    fatal error. In any case, preprocessing does not continue.

Проблема и бага только в том, что в GCC код не соответствовал
документации, так как "hack" запускался прежде "rogue"!


No differences found