Re: [Tinycc-devel] plans to 0.9.27 (was 0.9.28)

2017-09-24 Thread Christian Jullien
I only have a remote access on aarch64 using my gccfarm account and I
confess I don't test all commits.

Your suggestion:
-   char b;
+   signed char b;

Fixes it, you can push this change


-Original Message-
From: grischka [mailto:gris...@gmx.de] 
Sent: dimanche 24 septembre 2017 20:51
To: Christian Jullien; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.27 (was 0.9.28)

Christian Jullien wrote:
> While mod after you last commit works great on Windows 32/64 Rpi arm
> 
> It has one issue on Aarch64 (yet I don't know if it is related to your 
> last commit or not):

Hm.  It might have to do with unsigned-ness of chars on arm.  If so it is a
bug in the test and the change below might fix it.  (I still wonder whether
it did work earlier (and then why) or if it just wasn't tested at all yet on
arm64).

- tests/tests2/95_bitfields.c
- index 683becf..f025c57 100644 @@ -69,9 +69,9 @@
  #elif TEST == 6
  {
  struct M P __s {
int a;
-   char b;
+   signed char b;
int x : 12, y : 4, : 0, : 4, z : 3;
char d;
  };
  TEST_STRUCT(1,2,3,4,-3);

-- gr


> jullien@gcc113:~/tinycc$ uname -a
> Linux gcc113 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:45:34 UTC 
> 2016
> aarch64 aarch64 aarch64 GNU/Linux
> 
> Test: 95_bitfields...
> --- 95_bitfields.expect 2017-09-24 10:50:04.240209938 -0700
> +++ 95_bitfields.output 2017-09-24 10:50:43.236414994 -0700
> @@ -31,7 +31,7 @@
>   TEST 6 
>  bits in use : 007000FF  bits as set : 
> 0030002001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 4 12
> 
> 
> @@ -69,7 +69,7 @@
>   TEST 6 - PACKED 
>  bits in use : 007000FF
>  bits as set : 0030002001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 1 10
> 
> 
> @@ -107,7 +107,7 @@
>   TEST 6 - WITH ALIGN 
>  bits in use : 007000FF  bits as set : 
> 0030002001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 4 12
> 
> 
> @@ -145,5 +145,5 @@
>   TEST 6 - PACKED - WITH ALIGN   bits in use : 
> 007000FF  bits as set : 0030002001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 1 10
> make[2]: *** [95_bitfields.test] Error 1
> Test: 95_bitfields_ms...
> --- 95_bitfields_ms.expect  2017-09-24 10:50:04.240209938 -0700
> +++ 95_bitfields_ms.output  2017-09-24 10:50:43.246414020 -0700
> @@ -31,7 +31,7 @@
>   TEST 6 - MS-BITFIELDS 
>  bits in use : 007000FF
>  bits as set : 0030200100FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 4 20
> 
> 
> @@ -69,7 +69,7 @@
>   TEST 6 - MS-BITFIELDS - PACKED   bits in use : 
> 70FF  bits as set : 
> 302001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 1 14
> 
> 
> @@ -107,7 +107,7 @@
>   TEST 6 - MS-BITFIELDS - WITH ALIGN   bits in use : 
> 007000FF
>  bits as set : 0030200100FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 4 20
> 
> 
> @@ -145,5 +145,5 @@
>   TEST 6 - MS-BITFIELDS - PACKED - WITH ALIGN   bits in use : 
> 70FF  bits as set : 
> 302001FD0004
> -values  : 01 02 03 04 fffd
> +values  : 01 02 03 04 fd
>  align/size  : 1 14
> make[2]: *** [95_bitfields_ms.test] Error 1
> 
> -Original Message-
> From: Tinycc-devel 
> [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
> On Behalf Of Christian Jullien
> Sent: dimanche 24 septembre 2017 19:40
> To: 'grischka'; tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] plans to 0.9.28
> 
> Very nice indeed.
> 
> I offer you my time to test every attempts on:
> 
> Windows x86/x64
> Linux x86/x64
> RPi arm
> Aarch64
> 
> 
> -Original Message-
> From: grischka [mailto:gris...@gmx.de]
> Sent: dimanche 24 septembre 2017 19:10
> To: Christian JULLIEN; tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] plans to 0.9.28
> 
> Hi,
> 
> I just pushed a patch for more complete 'long' support (which was 
> started by Matthias Gatto for _Generic), as well as with eome 
> improvements for multicharacter constants:
> 
> http://repo.or.cz/tinycc.git/commitdiff/1443039416dd02750765efde1af35e
> 31c8d4
> 1be3
> 
> So, now, basically, I'd agree to, including the offer to undertake the 
> necessary steps, to release this, say after some weeks of for finel 
> testing, as
>  ___ 0.9.27 ___.
> 
> What do people think?
> 
> -- gr
> 
> Christian JULLIEN wrote:
>> Hi all,
>>
>>
>> Last December, we where close to release 0.9.28 but more than 6 
>> 

Re: [Tinycc-devel] spelling

2017-09-24 Thread Austin English
On Sun, Sep 24, 2017 at 8:08 PM, Larry Doolittle
 wrote:
> Friends -
>
> I just committed a patch with 28 spelling fixes to mob.
>
> One word baffled me: in tcc.h I find the comment
> "next related symbol (for fields and anoms)"
> What are anoms?
>
>   - Larry
>
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Anonymous structs, maybe?

-- 
-Austin
GPG: 14FB D7EA A041 937B

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] spelling

2017-09-24 Thread Larry Doolittle
Friends -

I just committed a patch with 28 spelling fixes to mob.

One word baffled me: in tcc.h I find the comment
"next related symbol (for fields and anoms)"
What are anoms?

  - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread Larry Doolittle
Friends -

On Sun, Sep 24, 2017 at 12:27:17PM -0700, Larry Doolittle wrote:
> On Sun, Sep 24, 2017 at 09:48:25AM +0200, Jan Nieuwenhuizen wrote:
> > -p[0] = x & 255, p[1] = x >> 8 & 255;
> The original line above, however, screams "I am a bug" to me.
> The return value of "x & 255" is ignored, and it has no side effects,
> so it can be discarded, leaving
>p[0] = p[1] = x >> 8 & 255;
> Is there any evidence it works?

I tested it, and it does in fact work.  Sorry, I got a little mixed up
on the order of operations.

Still, using comma there instead of semicolon seems needlessly confusing.
It suggests that these were once tricky macro expansions instead
of inline functions.  If it were me I would use semicolon there
(write32le()) and in write64le().

   - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread Larry Doolittle
Friends -

On Sun, Sep 24, 2017 at 09:48:25AM +0200, Jan Nieuwenhuizen wrote:
> -p[0] = x & 255, p[1] = x >> 8 & 255;
> +p[0] = x & 255; p[1] = x >> 8 & 255;

I think the comma operator is an awesome part of the C standard,
and sometimes permits much more clear and concise expression of
process than would otherwise be possible.

The original line above, however, screams "I am a bug" to me.
The return value of "x & 255" is ignored, and it has no side effects,
so it can be discarded, leaving
   p[0] = p[1] = x >> 8 & 255;
Is there any evidence it works?

   - Larry

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] plans to 0.9.27 (was 0.9.28)

2017-09-24 Thread grischka

Christian Jullien wrote:

While mod after you last commit works great on
Windows 32/64
Rpi arm

It has one issue on Aarch64 (yet I don't know if it is related to your last
commit or not):


Hm.  It might have to do with unsigned-ness of chars on arm.  If so
it is a bug in the test and the change below might fix it.  (I still
wonder whether it did work earlier (and then why) or if it just wasn't
tested at all yet on arm64).

- tests/tests2/95_bitfields.c -
index 683becf..f025c57 100644
@@ -69,9 +69,9 @@
 #elif TEST == 6
 {
 struct M P __s {
int a;
-   char b;
+   signed char b;
int x : 12, y : 4, : 0, : 4, z : 3;
char d;
 };
 TEST_STRUCT(1,2,3,4,-3);

-- gr



jullien@gcc113:~/tinycc$ uname -a
Linux gcc113 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:45:34 UTC 2016
aarch64 aarch64 aarch64 GNU/Linux

Test: 95_bitfields...
--- 95_bitfields.expect 2017-09-24 10:50:04.240209938 -0700
+++ 95_bitfields.output 2017-09-24 10:50:43.236414994 -0700
@@ -31,7 +31,7 @@
  TEST 6 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 12


@@ -69,7 +69,7 @@
  TEST 6 - PACKED 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 10


@@ -107,7 +107,7 @@
  TEST 6 - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 12


@@ -145,5 +145,5 @@
  TEST 6 - PACKED - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 10
make[2]: *** [95_bitfields.test] Error 1
Test: 95_bitfields_ms...
--- 95_bitfields_ms.expect  2017-09-24 10:50:04.240209938 -0700
+++ 95_bitfields_ms.output  2017-09-24 10:50:43.246414020 -0700
@@ -31,7 +31,7 @@
  TEST 6 - MS-BITFIELDS 
 bits in use : 007000FF
 bits as set : 0030200100FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 20


@@ -69,7 +69,7 @@
  TEST 6 - MS-BITFIELDS - PACKED 
 bits in use : 70FF
 bits as set : 302001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 14


@@ -107,7 +107,7 @@
  TEST 6 - MS-BITFIELDS - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030200100FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 20


@@ -145,5 +145,5 @@
  TEST 6 - MS-BITFIELDS - PACKED - WITH ALIGN 
 bits in use : 70FF
 bits as set : 302001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 14
make[2]: *** [95_bitfields_ms.test] Error 1

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of Christian Jullien
Sent: dimanche 24 septembre 2017 19:40
To: 'grischka'; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.28

Very nice indeed.

I offer you my time to test every attempts on:

Windows x86/x64
Linux x86/x64
RPi arm
Aarch64


-Original Message-
From: grischka [mailto:gris...@gmx.de]
Sent: dimanche 24 septembre 2017 19:10
To: Christian JULLIEN; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.28

Hi,

I just pushed a patch for more complete 'long' support (which was started by
Matthias Gatto for _Generic), as well as with eome improvements for
multicharacter constants:

http://repo.or.cz/tinycc.git/commitdiff/1443039416dd02750765efde1af35e31c8d4
1be3

So, now, basically, I'd agree to, including the offer to undertake the
necessary steps, to release this, say after some weeks of for finel testing,
as
 ___ 0.9.27 ___.

What do people think?

-- gr

Christian JULLIEN wrote:

Hi all,


Last December, we where close to release 0.9.28 but more than 6 months 
later, I see no plans for an imminent 0.9.28 release.


I'm fortunate to know how to build tcc on the many machines I use but 
also see many users trying to use a very old 0.9.27 version.


I think it's time to release 0.9.28 and start new dev. on 0.9.29 IMHO,

- we should decide what we really want to implement before we release
0.9.28 and propose an ETA for implementation

- enter a bug fix, validation cycle (no new feature or gratuitous
changes)

- check all ports (Windows 32/64, Linux x86, x64, arm, Aarch64, 
more?), I will test all of them


- Make 0.9.28


Sounds reasonable to you?


--
--


Re: [Tinycc-devel] plans to 0.9.28

2017-09-24 Thread Christian Jullien
While mod after you last commit works great on
Windows 32/64
Rpi arm

It has one issue on Aarch64 (yet I don't know if it is related to your last
commit or not):

jullien@gcc113:~/tinycc$ uname -a
Linux gcc113 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:45:34 UTC 2016
aarch64 aarch64 aarch64 GNU/Linux

Test: 95_bitfields...
--- 95_bitfields.expect 2017-09-24 10:50:04.240209938 -0700
+++ 95_bitfields.output 2017-09-24 10:50:43.236414994 -0700
@@ -31,7 +31,7 @@
  TEST 6 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 12


@@ -69,7 +69,7 @@
  TEST 6 - PACKED 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 10


@@ -107,7 +107,7 @@
  TEST 6 - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 12


@@ -145,5 +145,5 @@
  TEST 6 - PACKED - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030002001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 10
make[2]: *** [95_bitfields.test] Error 1
Test: 95_bitfields_ms...
--- 95_bitfields_ms.expect  2017-09-24 10:50:04.240209938 -0700
+++ 95_bitfields_ms.output  2017-09-24 10:50:43.246414020 -0700
@@ -31,7 +31,7 @@
  TEST 6 - MS-BITFIELDS 
 bits in use : 007000FF
 bits as set : 0030200100FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 20


@@ -69,7 +69,7 @@
  TEST 6 - MS-BITFIELDS - PACKED 
 bits in use : 70FF
 bits as set : 302001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 14


@@ -107,7 +107,7 @@
  TEST 6 - MS-BITFIELDS - WITH ALIGN 
 bits in use : 007000FF
 bits as set : 0030200100FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 4 20


@@ -145,5 +145,5 @@
  TEST 6 - MS-BITFIELDS - PACKED - WITH ALIGN 
 bits in use : 70FF
 bits as set : 302001FD0004
-values  : 01 02 03 04 fffd
+values  : 01 02 03 04 fd
 align/size  : 1 14
make[2]: *** [95_bitfields_ms.test] Error 1

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of Christian Jullien
Sent: dimanche 24 septembre 2017 19:40
To: 'grischka'; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.28

Very nice indeed.

I offer you my time to test every attempts on:

Windows x86/x64
Linux x86/x64
RPi arm
Aarch64


-Original Message-
From: grischka [mailto:gris...@gmx.de]
Sent: dimanche 24 septembre 2017 19:10
To: Christian JULLIEN; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.28

Hi,

I just pushed a patch for more complete 'long' support (which was started by
Matthias Gatto for _Generic), as well as with eome improvements for
multicharacter constants:

http://repo.or.cz/tinycc.git/commitdiff/1443039416dd02750765efde1af35e31c8d4
1be3

So, now, basically, I'd agree to, including the offer to undertake the
necessary steps, to release this, say after some weeks of for finel testing,
as
 ___ 0.9.27 ___.

What do people think?

-- gr

Christian JULLIEN wrote:
> 
> Hi all,
> 
> 
> Last December, we where close to release 0.9.28 but more than 6 months 
> later, I see no plans for an imminent 0.9.28 release.
> 
> I'm fortunate to know how to build tcc on the many machines I use but 
> also see many users trying to use a very old 0.9.27 version.
> 
> I think it's time to release 0.9.28 and start new dev. on 0.9.29 IMHO,
> 
> - we should decide what we really want to implement before we release
> 0.9.28 and propose an ETA for implementation
> 
> - enter a bug fix, validation cycle (no new feature or gratuitous
> changes)
> 
> - check all ports (Windows 32/64, Linux x86, x64, arm, Aarch64, 
> more?), I will test all of them
> 
> - Make 0.9.28
> 
> 
> Sounds reasonable to you?
> 
> 
> --
> --
> 
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread grischka

I wonder which would be the smaller patch:  The changes you propose
for tcc or a patch to support these constructs as is in the bootstrap
compiler.

Otherwise if that is not your criterion what would be the arguments
for the semantics that you mention that they do not belong to
"simple enough C"?

Of course from our point of view tcc IS a simple C compiler almost by
definition, so, since it can compile itself, it must be written in
already sufficiently simple C ;)

Also as source tcc is supposed to be C89, except maybe 'long long'
and maybe some minor things here or there which we could change
indeed if that is wanted (for example usage of compound initializers
in arm-gen.c)

-- gr

Jan Nieuwenhuizen wrote:

Hi!

Are you willing to consider discussing/taking patches that reduce the
variety and complexity of C constructs used in TinyCC source code?

I have a list of about 20 unpolished patches[0] for constructs like:
comma operator

-p[0] = x & 255, p[1] = x >> 8 & 255;
+p[0] = x & 255; p[1] = x >> 8 & 255;

or (heterogeneous) initialzer lists

-uint8_t buf[1000], *p = buf;
+uint8_t buf[1000];
+uint8_t *p = buf;

or function return derefencing

-v = tok_alloc(astr.data, astr.size - 1)->tok;
+TokenSym *tk = tok_alloc(astr.data, astr.size - 1);
+v = tk->tok;

or complex field access

-return table_ident[v]->sym_define;
+TokenSym *t = table_ident[v];
+Sym *s = t->sym_define;
+return s;

or even struct by value assign

-vtop->type = *type;
+memcpy (>type, type, sizeof (CType));

that allow tcc to be compiled with a simpler C compiler, so that in time
we could add to README something like

- BOOTSTRAPPABLE!  Because tcc uses only a subset of C99 (C99--), it
can be bootstrapped with a simple C compiler.

Knowing[1] that TinyCC can build Gcc (wow!) and building tcc is easier
than building gcc, it is a good candidate for use in a bootstrap path.

The past couple of months I have been working to bootstrap tcc using
mescc, a simple C compiler that can (almost) be bootstrapped from
source.  I have just released[2] Mes 0.10 which can compile a modified
version of mes-tcc, which can compile a trivial C program into a working
executable.

Much work will have to be done before mes-tcc will be able to build a
functional Gcc.  I would like to start by reducing the delta on tcc that
I'm carrying.

What do you think, is bootstrappable builds[4] something you would want
to support and what could C99-- look like?

Greetings,
janneke

[0] https://gitlab.com/janneke/tinycc/commits/wip-mescc
[1] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00099.html
[2] http://lists.gnu.org/archive/html/guile-user/2017-09/msg00027.html
[3] http://bootstrappable.org





___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] plans to 0.9.28

2017-09-24 Thread Christian Jullien
Very nice indeed.

I offer you my time to test every attempts on:

Windows x86/x64
Linux x86/x64
RPi arm
Aarch64


-Original Message-
From: grischka [mailto:gris...@gmx.de] 
Sent: dimanche 24 septembre 2017 19:10
To: Christian JULLIEN; tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] plans to 0.9.28

Hi,

I just pushed a patch for more complete 'long' support (which was started by
Matthias Gatto for _Generic), as well as with eome improvements for
multicharacter constants:

http://repo.or.cz/tinycc.git/commitdiff/1443039416dd02750765efde1af35e31c8d4
1be3

So, now, basically, I'd agree to, including the offer to undertake the
necessary steps, to release this, say after some weeks of for finel testing,
as
 ___ 0.9.27 ___.

What do people think?

-- gr

Christian JULLIEN wrote:
> 
> Hi all,
> 
> 
> Last December, we where close to release 0.9.28 but more than 6 months 
> later, I see no plans for an imminent 0.9.28 release.
> 
> I'm fortunate to know how to build tcc on the many machines I use but 
> also see many users trying to use a very old 0.9.27 version.
> 
> I think it's time to release 0.9.28 and start new dev. on 0.9.29 IMHO,
> 
> - we should decide what we really want to implement before we release
> 0.9.28 and propose an ETA for implementation
> 
> - enter a bug fix, validation cycle (no new feature or gratuitous 
> changes)
> 
> - check all ports (Windows 32/64, Linux x86, x64, arm, Aarch64, 
> more?), I will test all of them
> 
> - Make 0.9.28
> 
> 
> Sounds reasonable to you?
> 
> 
> --
> --
> 
> ___
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] plans to 0.9.28

2017-09-24 Thread grischka

Hi,

I just pushed a patch for more complete 'long' support (which was started
by Matthias Gatto for _Generic), as well as with eome improvements for
multicharacter constants:

http://repo.or.cz/tinycc.git/commitdiff/1443039416dd02750765efde1af35e31c8d41be3

So, now, basically, I'd agree to, including the offer to undertake the
necessary steps, to release this, say after some weeks of for finel testing,
as
___ 0.9.27 ___.

What do people think?

-- gr

Christian JULLIEN wrote:


Hi all,


Last December, we where close to release 0.9.28 but more than 6 months 
later, I see no plans for an imminent 0.9.28 release.


I'm fortunate to know how to build tcc on the many machines I use but 
also see many users trying to use a very old 0.9.27 version.


I think it's time to release 0.9.28 and start new dev. on 0.9.29
IMHO,

- we should decide what we really want to implement before we release 
0.9.28 and propose an ETA for implementation


- enter a bug fix, validation cycle (no new feature or gratuitous changes)

- check all ports (Windows 32/64, Linux x86, x64, arm, Aarch64, more?), 
I will test all of them


- Make 0.9.28


Sounds reasonable to you?




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread Christian Jullien
A non-maintainer, here are my 2c:

As a matter of style, I like this idea but:
- tcc is probably already the smallest C compiler that compiles a decent C 
compiler
- as you probably noticed, there is not a huge activity on tcc these days and I 
personally prefer than one spent time on something immediately useful for tcc 
core, like C11 support.
- changing code that works is risky because we must ensure nothing is broken 
and tcc tests suite is far from complete (not counting the fact that we have no 
platform regression tests)
- it's a common practice for a compiler X to be compiled by itself. This has 
the advantage to test more code combinations it is supposed to support.
- it will introduce gratuitous diff that will make harder to identify real 
regression

That said, and especially because the lack of a decent non-regression tests 
suite, I personally vote against your proposal.

-Original Message-
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Jan Nieuwenhuizen
Sent: dimanche 24 septembre 2017 09:48
To: tinycc-devel@nongnu.org
Cc: Jeremiah Orians
Subject: [Tinycc-devel] Using tinycc for full source bootstrapping

Hi!

Are you willing to consider discussing/taking patches that reduce the variety 
and complexity of C constructs used in TinyCC source code?

I have a list of about 20 unpolished patches[0] for constructs like:
comma operator

-p[0] = x & 255, p[1] = x >> 8 & 255;
+p[0] = x & 255; p[1] = x >> 8 & 255;

or (heterogeneous) initialzer lists

-uint8_t buf[1000], *p = buf;
+uint8_t buf[1000];
+uint8_t *p = buf;

or function return derefencing

-v = tok_alloc(astr.data, astr.size - 1)->tok;
+TokenSym *tk = tok_alloc(astr.data, astr.size - 1);
+v = tk->tok;

or complex field access

-return table_ident[v]->sym_define;
+TokenSym *t = table_ident[v];
+Sym *s = t->sym_define;
+return s;

or even struct by value assign

-vtop->type = *type;
+memcpy (>type, type, sizeof (CType));

that allow tcc to be compiled with a simpler C compiler, so that in time we 
could add to README something like

- BOOTSTRAPPABLE!  Because tcc uses only a subset of C99 (C99--), it
can be bootstrapped with a simple C compiler.

Knowing[1] that TinyCC can build Gcc (wow!) and building tcc is easier than 
building gcc, it is a good candidate for use in a bootstrap path.

The past couple of months I have been working to bootstrap tcc using mescc, a 
simple C compiler that can (almost) be bootstrapped from source.  I have just 
released[2] Mes 0.10 which can compile a modified version of mes-tcc, which can 
compile a trivial C program into a working executable.

Much work will have to be done before mes-tcc will be able to build a 
functional Gcc.  I would like to start by reducing the delta on tcc that I'm 
carrying.

What do you think, is bootstrappable builds[4] something you would want to 
support and what could C99-- look like?

Greetings,
janneke

[0] https://gitlab.com/janneke/tinycc/commits/wip-mescc
[1] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00099.html
[2] http://lists.gnu.org/archive/html/guile-user/2017-09/msg00027.html
[3] http://bootstrappable.org

--
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org 
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread Edmund Grimley Evans
I'm not an active contributor so my opinion doesn't count for much,
but here it is anyway.

Though I like the idea of implementing TCC in a smaller subset of C it
should be a clearly defined subset of C and preferably one that makes
sense generally rather than just for a particular bootstrap path. Why
not start with C89 rather than C99?

Some of the examples you gave don't make the language significantly
simpler, in my opinion. I don't think restricting C's expression
syntax makes the compiler writer's job any easier (though some code
style rules reject the comma operator anyway). If you want to simplify
things ban floating-point types, structs as arguments and most of the
standard header files and library functions. Also "switch" and "goto",
perhaps.

Edmund

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] Using tinycc for full source bootstrapping

2017-09-24 Thread Jan Nieuwenhuizen
Hi!

Are you willing to consider discussing/taking patches that reduce the
variety and complexity of C constructs used in TinyCC source code?

I have a list of about 20 unpolished patches[0] for constructs like:
comma operator

-p[0] = x & 255, p[1] = x >> 8 & 255;
+p[0] = x & 255; p[1] = x >> 8 & 255;

or (heterogeneous) initialzer lists

-uint8_t buf[1000], *p = buf;
+uint8_t buf[1000];
+uint8_t *p = buf;

or function return derefencing

-v = tok_alloc(astr.data, astr.size - 1)->tok;
+TokenSym *tk = tok_alloc(astr.data, astr.size - 1);
+v = tk->tok;

or complex field access

-return table_ident[v]->sym_define;
+TokenSym *t = table_ident[v];
+Sym *s = t->sym_define;
+return s;

or even struct by value assign

-vtop->type = *type;
+memcpy (>type, type, sizeof (CType));

that allow tcc to be compiled with a simpler C compiler, so that in time
we could add to README something like

- BOOTSTRAPPABLE!  Because tcc uses only a subset of C99 (C99--), it
can be bootstrapped with a simple C compiler.

Knowing[1] that TinyCC can build Gcc (wow!) and building tcc is easier
than building gcc, it is a good candidate for use in a bootstrap path.

The past couple of months I have been working to bootstrap tcc using
mescc, a simple C compiler that can (almost) be bootstrapped from
source.  I have just released[2] Mes 0.10 which can compile a modified
version of mes-tcc, which can compile a trivial C program into a working
executable.

Much work will have to be done before mes-tcc will be able to build a
functional Gcc.  I would like to start by reducing the delta on tcc that
I'm carrying.

What do you think, is bootstrappable builds[4] something you would want
to support and what could C99-- look like?

Greetings,
janneke

[0] https://gitlab.com/janneke/tinycc/commits/wip-mescc
[1] https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00099.html
[2] http://lists.gnu.org/archive/html/guile-user/2017-09/msg00027.html
[3] http://bootstrappable.org

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel