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

2016-07-05 Thread S. Gilles
On 2016-07-05T16:00:11-0300, Marc Collin wrote: > > I don't think this does what you expect it to do. At least looking at > > the 8cc makefile, the compiler is hardcoded as `cc', not the expansion > > of the variable `cc'. > > You are right. > But the CC flag is accepted. > Try "make CC=clang" an

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

2016-07-05 Thread Marc Collin
Actually, "make CC=../1c/8cc" works but 8cc doesn't support no-strict-aliasing. [ERROR] main.c:87: (null): unknown -W option: no-strict-aliasing On Tue, Jul 5, 2016 at 4:00 PM, Marc Collin wrote: >> I don't think this does what you expect it to do. At least looking at >> the 8cc makefile, the

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

2016-07-05 Thread Marc Collin
> I don't think this does what you expect it to do. At least looking at > the 8cc makefile, the compiler is hardcoded as `cc', not the expansion > of the variable `cc'. You are right. But the CC flag is accepted. Try "make CC=clang" and it will work. But "make CC=../1c/8cc" fails. Any idea how to

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

2016-07-05 Thread S. Gilles
On 2016-07-05T15:31:57-0300, Marc Collin wrote: > I did some tests with 8cc (because it's easier to build than scc for me). > My results are that the binaries aren't identical. > Here's a script so you can try to reproduce it. > > #!/bin/sh > mkdir test_comp > cd test_comp > git clone https://gith

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

2016-07-05 Thread Ben Woolley
> On Jul 5, 2016, at 11:31 AM, Marc Collin wrote: > > I did some tests with 8cc (because it's easier to build than scc for me). > My results are that the binaries aren't identical. > Here's a script so you can try to reproduce it. > > #!/bin/sh > mkdir test_comp > cd test_comp > git clone http

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

2016-07-05 Thread Marc Collin
I did some tests with 8cc (because it's easier to build than scc for me). My results are that the binaries aren't identical. Here's a script so you can try to reproduce it. #!/bin/sh mkdir test_comp cd test_comp git clone https://github.com/rui314/8cc mv 8cc 1c cp -r 1c 2c cp -r 1c Ac cp -r 1c Bc

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

2016-07-05 Thread Hinnerk van Bruinehsen
On Tue, Jul 05, 2016 at 08:11:51PM +0200, Hinnerk van Bruinehsen wrote: > On Tue, Jul 05, 2016 at 07:24:38PM +0200, Quentin Rameau wrote: > > > So let's consider 3 situations. > > > 1-- Compile scc with gcc. Use the output binary to compile scc. Get B1 > > > 2-- Compile scc with tcc. Use the output

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

2016-07-05 Thread Hinnerk van Bruinehsen
On Tue, Jul 05, 2016 at 07:24:38PM +0200, Quentin Rameau wrote: > > So let's consider 3 situations. > > 1-- Compile scc with gcc. Use the output binary to compile scc. Get B1 > > 2-- Compile scc with tcc. Use the output binary to compile scc. Get B2 > > 3-- Compile scc with clang. Use the output bi

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

2016-07-05 Thread Quentin Rameau
> So let's consider 3 situations. > 1-- Compile scc with gcc. Use the output binary to compile scc. Get B1 > 2-- Compile scc with tcc. Use the output binary to compile scc. Get B2 > 3-- Compile scc with clang. Use the output binary to compile scc. Get > B3 > > Are you saying that if we compare the

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

2016-07-05 Thread Marc Collin
So let's consider 3 situations. 1-- Compile scc with gcc. Use the output binary to compile scc. Get B1 2-- Compile scc with tcc. Use the output binary to compile scc. Get B2 3-- Compile scc with clang. Use the output binary to compile scc. Get B3 Are you saying that if we compare the md5 of B1, B2

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

2016-07-05 Thread Evan Gates
On Sun, Jul 3, 2016 at 7:49 AM, Marc Collin wrote: > >Any compiler following the c99 standard will work. > But a binary compiled with gcc or clang will suck. No? > Even if scc source is suckless, won't the binary suck with we use > gcc/clang to compile it? If you need to build a compiler, and don

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

2016-07-03 Thread Marc Collin
>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”. I got the idea from here. https://sourceforge.net/p/schillix-on/schillix-on/ci/6071f8422be450d2c3abd949005e0cb02960932c/ I changed config.mk. #CC = c99 to CC = cc. Otherwise I

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

2016-07-03 Thread Quentin Rameau
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.

[dev] [scc] typeof is a gcc keyword

2016-07-03 Thread Marc Collin
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 A rename from typeof to type_of fixes the issue. --- a/cc1/expr.c +++ b/cc1/expr.c @@ -765,7 +765,7 @@ static Node *unary(void); static Type * -typeof(Node *np) +