Re: [Tinycc-devel] defined twice error commented out

2015-10-28 Thread Sergey Korshunoff
Hi Stephan Beal
> That is not valid logic for justifying the silencing of a fatal code condition
But a condition is not fatal

>> What a solution can be:
What you can say about a right way?

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


Re: [Tinycc-devel] defined twice error commented out

2015-10-28 Thread Stephan Beal
On Oct 28, 2015 23:46, "Sergey Korshunoff"  wrote:
>
> Hi Michael Matz
>
> > No, please keep the message
> That was a quick fix for the problem.

One does not simply "quick-fix" a globally shared source repo.

> > So, please revert.
> Revert is not a solition. If gcc don't complain, than a tcc must not
> complain too.

That is not valid logic for justifying the silencing of a fatal code
condition. Duplicate definitions are illegal. We could also claim,  "MSVC
does this, so tcc must as well." Wrong answer.

> What a solution can be:
>  * a some switch to disable this error message (a simple solution)
> How to name it?
>
>  * producing a common symbols by tcc too. Can tcc do this?
>
> ___
> 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] modern c++ compiler written in C (food for thought)

2015-10-28 Thread Basile Starynkevitch

On 10/29/2015 12:27 AM, Sergey Korshunoff wrote:

Hi Christian Jullien!

I'm really afraid to see discussion on about to optimize Cfront tcc backend!

There is no such discussion. But Basile and you trying to say tcc is
not a real compiler, a tcc can not be used to perform some task. Only
because it is not a optimizer compiler. This is not true. We don't
need an optimizer compiler all the time. Some words from the MELT
build instructions:
  - 6 GByte of the RAM
  - 20 minutes for build
Only because a C++ must be compiled
I know that, but your reasoning is wrong. When GCC was in C and I 
started MELT,
it needed more RAM and more CPU to get built (and it generated C code, 
not C++).

 So it is definitely not a matter of C++.
If you want to discuss why is it so (I know quite well the reasons), let 
us please do so on gcc-m...@googlegroups.com


Cheers.

--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basilestarynkevitchnet mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


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


Re: [Tinycc-devel] modern c++ compiler written in C (food for thought)

2015-10-28 Thread Christian Jullien
Ooops! Don't misunderstand me. No doubt to me, tcc *IS* a real C compiler
and, even it does not have all optimization phases of its competitor, it
does not behaves too bad.

I love its compilation speed and, with reasonable efforts, its code is
understandable.

 

My only concern is to see efforts is to have C++ based on tcc. Cfront was
made on an age where C standard was K&R (no const, no prototypes ...). C++
compilers evolved a lot to be smart enough to compile complex C++ code to
something efficient.

 

Once again, I deeply respect the efforts to have a Cfront(tcc) working with
minimal changes in Cfront source code 'just for the fun'. But, IMHO, it's a
waste of time any attempt to do more. I bet the result will be used by
nobody because poor performances and lack of support for more recent C++
features.

 

M2c.

 

Christian

 

PS. Here are my own benchmarks made on my Lisp compiler using different C
compilers, tcc lack of optimization makes the Lisp compiler SLOWER than
interpreter!!! I don't want to imagine the performance loss on a C++
benchmark using Cfront(tcc). However, I repeat I LOVE tcc TRUE C Compiler
:o)

 

GNU GCC 5.x (Mgw) Win32 (LAPtoCC) |  0.202

Microsoft C 18.0  Win32 (LAPtoCC) |  0.217

GNU GCC 5.x (Mgw) Win64 (LAPtoCC) |  0.237

Microsoft C 18.0  Win64 (LAPtoCC) |  0.237

Digital Mars 8.57 Win32 (LAPtoCC) |  0.248

Tiny C Compiler   Win32 (LAPtoCC) |  0.339

Tiny C Compiler   Win64 (LAPtoCC) |  0.382

GNU GCC 5.x (Mgw) Win32 (Compile) |  1.082

Watcom C 1.90 Win32 (Compile) |  1.142

Microsoft C 18.0  Win64 (Compile) |  1.216

Microsoft C 18.0  Win32 (Compile) |  1.253

Digital Mars 8.57 Win32 (Compile) |  1.353

LCC C CompilerWin32 (Compile) |  1.467

GNU GCC 5.x (Mgw) Win64 (Compile) |  1.526

IBM Visual Age C  Win32 (Compile) |  1.580

Microsoft C 18.0  Win32 (32 bits) |  1.802

Microsoft C 18.0  Win32 (Unicode) |  1.819

Microsoft C 18.0  Win64 (64 bits) |  1.838

LCC C CompilerWin64 (Compile) |  1.866

Microsoft C 18.0  Win64 (Unicode) |  2.084

GNU GCC 5.x (Mgw) Win32 (32 bits) |  2.274

GNU GCC 5.x (Mgw) Win64 (64 bits) |  2.373

Watcom C 1.90 Win32 (32 bits) |  2.703

IBM Visual Age C  Win32 (32 bits) |  2.859

Pelles C Compiler Win32 (32 bits) |  3.563

Digital Mars 8.57 Win32 (32 bits) |  3.630

LCC C CompilerWin32 (32 bits) |  3.763

Pelles C Compiler Win64 (64 bits) |  4.071

LCC C CompilerWin64 (64 bits) |  4.887

Tiny C Compiler   Win32 (32 bits) |  5.899

Tiny C Compiler   Win64 (64 bits) |  5.903

Tiny C Compiler   Win32 (Compile) | 10.500

Tiny C Compiler   Win64 (Compile) | 10.790

 

-Original Message-
From: tinycc-devel-bounces+eligis=orange...@nongnu.org
[mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of
Sergey Korshunoff
Sent: jeudi 29 octobre 2015 00:27
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] modern c++ compiler written in C (food for
thought)

 

Hi Christian Jullien!

> I'm really afraid to see discussion on about to optimize Cfront tcc
backend!

There is no such discussion. But Basile and you trying to say tcc is not a
real compiler, a tcc can not be used to perform some task. Only because it
is not a optimizer compiler. This is not true. We don't need an optimizer
compiler all the time. Some words from the MELT build instructions:

- 6 GByte of the RAM

- 20 minutes for build

Only because a C++ must be compiled

 

> It has the reputation to be slower than C and, in some sense, it is 

> true when used by non-highly experimenter C++ programmers. (In real 

> life, C++ can outperform C

> - I have code that run >2x as fast in C++ --thanks to templates-- than in
C).

 

I looked in OW STL some words about comparison a C++ way programming with
plain C: in some cases C++ slower a plain C by 1.5  It is not a fail of the
"highly expnon-erimented C++ programmers". But yes: C++ can be as fast as a
plain C if you don't use C++ features or use only a templates w/o classes.

 

PS: I can't fast find this article: a test  was a C way list and iterators
against a C++ list, iterators and so...

 

___

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] modern c++ compiler written in C (food for thought)

2015-10-28 Thread Sergey Korshunoff
Hi Christian Jullien!
> I'm really afraid to see discussion on about to optimize Cfront tcc backend!
There is no such discussion. But Basile and you trying to say tcc is
not a real compiler, a tcc can not be used to perform some task. Only
because it is not a optimizer compiler. This is not true. We don't
need an optimizer compiler all the time. Some words from the MELT
build instructions:
 - 6 GByte of the RAM
 - 20 minutes for build
Only because a C++ must be compiled

> It has the reputation to be slower than C and, in some sense, it is true when 
> used by
> non-highly experimenter C++ programmers. (In real life, C++ can outperform C
> - I have code that run >2x as fast in C++ --thanks to templates-- than in C).

I looked in OW STL some words about comparison a C++ way programming
with plain C: in some cases C++ slower a plain C by 1.5  It is not a
fail of the "highly expnon-erimented C++ programmers". But yes: C++
can be as fast as a plain C if you don't use C++ features or use only
a templates w/o classes.

PS: I can't fast find this article: a test  was a C way list and
iterators against a C++ list, iterators and so...

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


Re: [Tinycc-devel] defined twice error commented out

2015-10-28 Thread Sergey Korshunoff
Hi Michael Matz

> No, please keep the message
That was a quick fix for the problem.

> So, please revert.
Revert is not a solition. If gcc don't complain, than a tcc must not
complain too.
What a solution can be:
 * a some switch to disable this error message (a simple solution)
How to name it?

 * producing a common symbols by tcc too. Can tcc do this?

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


Re: [Tinycc-devel] defined twice error commented out

2015-10-28 Thread Michael Matz
Hi,

On Sun, 25 Oct 2015, Sergey Korshunoff wrote:

> Hi! Commented out a tcc_error_noabort("'%s' defined twice"... on mob
> gcc-3.4.6 don't give such error by default
> example file1.c
>   char __version_303_;
>   void func1() {}
> example file2.c
>   char __version_303_;
>   void func2() {}
>   int main() { return 0; }
> I think there must be a switch to supress such message as minimum

No, please keep the message.  That GNU ld doesn't error out in this case 
is a side-effect of GCC using common symbols.  If it wouldn't then also ld 
would error.  Try compiling the above with -fno-common and GCC and you'll 
see it.

It would also error out if you would initialize both definitions.  So, 
please revert.


Ciao,
Michael.

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