Whatever style is used, IMHO it is important to commit changes respecting the 
global project style (variable and function names, space or tab, indentation…)

 

Switching from projects also imposes to switch to different programming style.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Vad Rulezz
Sent: Tuesday, February 18, 2020 08:45
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] *** SPAM *** My changes

 

Hi,
I find this style to be easier to visually parse as the spaces do what they are 
supposed to do - they separate syntactical entities and it's clear then that 
parentheses are not part of the expression.

But of course it's better to stick to the single style in entire file (at 
least) or in entire project.

Vad

On 2/18/20 10:14 AM, Christian Jullien wrote:



Hi Udo,

As matter of style, I see you add extra spaces around if expressions like:

                if (bt1 == VT_LLONG)

                if ( bt1 == VT_LLONG )

                     type.t &= t1;

                if (bt2 == VT_LLONG)

                if ( bt2 == VT_LLONG )

 

Which is a very uncommon programming style in tcc code

 

~/tinycc $ fgrep 'if ( ' *.c *.h

tccelf.c:        if ( ref->handle )

tccgen.c:            else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) {

tccgen.c:            if ( ad.cleanup_func ) {

tccgen.c:            if ( (vtop->type.t & VT_BTYPE) != VT_STRUCT ) {

tccgen.c:            } else if ( bt1 == VT_BOOL && bt2 == VT_BOOL ) {

tccgen.c:            } else if ( is_float(bt1) && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_float(bt2) ) {

tccgen.c:                if ( bt1 == VT_LLONG )

tccgen.c:                if ( bt2 == VT_LLONG )

tccgen.c:            else if ( bt1 == VT_PTR && is_null_pointer(vtop) ) {

tccgen.c:            } else if ( is_null_pointer(&sv) && bt2 == VT_PTR ) {

tccgen.c:            }  else if ( bt1 == VT_PTR && is_integer_btype(bt2) ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && bt2 == VT_PTR ) {

tccgen.c:            } else if ( bt1==VT_PTR && bt2 == VT_PTR ) {

tccgen.c:                if ( type1.ref != type2.ref ) {

tccgen.c:            } else if ( is_integer_btype(bt1) && is_integer_btype(bt2) 
) {

tccpe.c:                        if ( !dllref->handle )

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Udo Pfrengle
Sent: Monday, February 17, 2020 23:35
To: tinycc-devel@nongnu.org
Subject: *** SPAM *** [Tinycc-devel] My changes

 

Hi folks,

 

I hope I do not too much nonsense with my changes.

No clue why there appeared a merge from me, that was a mistake - I am new to 
git and still learning it.

 

I am really excited about the speed and terseness of tcc and would like to help 
to improve it further. 

Have you any recommendations? Are there some weak spots which need some work?

 

... and I unintentionally disclosed my eMail address. Is there a way to remove 
it from the git log again?

 

Kind regards

Udo

 





_______________________________________________
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

Reply via email to