News for hackers. Stuff that matters.
Re:Signed Char Lotte by nickdrozd on Thursday April 01, 2021 @06:22PM (#26666968)
Has anyone ever tried to compile it? It doesn't work for me:

  gcc -w 1990/tbr.c
  1990/tbr.c: In function ‘main’:
  1990/tbr.c:7:50: error: void value not ignored as it ought to be
      7 |   e(-8)     ,gets      (1+(    c=q)     )||      exit      (0);     r(0,0)
        |                                                  ^~~~~~~~~~~~~
  1990/tbr.c: In function ‘e’:
  1990/tbr.c:22:43: error: void value not ignored as it ought to be
     22 |  3 ;}e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):
        |                                           ^~~~~~~
Similar for clang. I'm sure there is an easy fix, but I don't know what it is.

The program in question, if anyone is wondering, was the 1990 winner of IOCCC "Best Utility" award. Source is here:

  https://www.ioccc.org/1990/tbr.c
The authors explain in rot13: "Guvf cebtenz vf n ehqvzragnel furyy."
Re:Signed Char Lotte by jfk13 on Thursday April 01, 2021 @06:41PM (#26667156)
Works for me with

    clang -std=c89 -Wno-implicit-function-declaration -fno-builtin tbr.c
Compilers are fussier (with good reason!) than they used to be.
Re:Signed Char Lotte by nickdrozd on Thursday April 01, 2021 @06:55PM (#26667305)
Those flags work with gcc too. A deleted commented suggested adding `int exit();`, which also worked.
Re:Signed Char Lotte by lifthrasiir on Thursday April 01, 2021 @09:58PM (#26668398)
exit is a function returning void, which was traditionally coerced to 0 but anymore. Yusuke Endoh's patch [1] is available.

[1] https://mame.github.io/ioccc-ja-spoilers/patches/1990-tbr.pa...

Re:Signed Char Lotte by byronr on Friday April 02, 2021 @10:36AM (#26671735)
No coercion needed. Pre-ANSI C does not have a void type, so unless otherwise specified the return type of a function defaults to int.