Re: [dev] [scc] typeof is a gcc keyword

From: Quentin Rameau <>
Date: Sun, 3 Jul 2016 16:25:41 +0200

Hey Marc,

> Hey, I tried to compile scc with gcc and it failed because typeof is a
> gcc keyword and scc has a function called typeof on cc1/expr.c
That's not really the cause. You'll have to use a c99 compiler to build
scc. Maybe yours need an option like “-std=c99”.

> Then I got scc to compile.

> But this leaves me with the question on how to use scc?
> I got a /bin directory with cc1, cc2 and scc.
> ./scc hello.c gives errors.
> scc: execvp /home/marcc/libexec/scc/cc1: No such file or directory
> scc: execvp /home/marcc/libexec/scc/cc2: No such file or directory
make install

> Then I thought maybe the Makefile failed to create correct
> directories, so I did mkdir ~/libexec && mkdir ~/libexec/scc && mv
> ~/scc/bin/* ~/libexec/scc
> This worked, now scc could find the directory and bin files it needed.
> But I got another error now.
> /home/marcc/hello.c:1: error: included file 'stdio.h' not found
> /home/marcc/hello.c:6: error: 'printf' undeclared
> /home/marcc/hello.c:6: error: function or function pointer expected
scc -I where/your/c/headers/files/are
(although scc isn't necessarily able to parse them atm).

> Then I though, maybe I can install scc on the system and everything
> will work. No!
> "sudo make clean install" creates /root/scc which isn't usual.
Have a look at By default it uses PREFIX=$HOME. So if you
want to install scc elsewhere, rebuild it setting the PREFIX to

> How can I get it right?
Reading the code.

> Also, this got me thinking.
> scc will have to be compiled the first time with another compiler.

> Which one should we use? Compiling scc with a non-suckless compiler is
> bad, but is there a work-around?
Any compiler following the c99 standard will work.

> Well, that was my experience after playing with scc for a few minutes.
You may want to test it with the qbe backend for now, as most of the
work is done there atm.

Received on Sun Jul 03 2016 - 16:25:41 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 03 2016 - 16:36:11 CEST