Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A free compiler you might not have heard about ...

Author: Miguel A. Ballicora

Date: 06:38:26 04/19/02

Go up one level in this thread


On April 19, 2002 at 09:28:48, Daniel Clausen wrote:

>On April 19, 2002 at 09:18:02, Miguel A. Ballicora wrote:
>
>>On April 19, 2002 at 05:38:16, Gian-Carlo Pascutto wrote:
>>
>>>On April 19, 2002 at 03:53:35, Dann Corbit wrote:
>>>>    if (pawn_rank[LIGHT][f] == 6);      /* pawn hasn't moved */
>>>>                                ^
>>>>eval.c(335) : Warning 7: possible extraneous ';'
>>>>    if (pawn_rank[DARK][f] == 1);
>>>>                               ^
>>>>eval.c(382) : Warning 7: possible extraneous ';'
>>>
>>>Is TSCP buggy?
>>>
>>>I think this is a very valuable warning, too bad neither
>>>MSVC, Intel C or gcc don't have it.
>>
>>Are you sure? I have seen once this warning in my program (it was a typo)
>>and I only use MVSC and cygwin. I wonder if it is because I had all the warnings
>>on. Maybe my memory is tricking me.
>>
>>Anyway
>>
>>if (bool_var);
>>
>>is a terrible style.
>>Much better could be
>>
>>if (bool_var)
>>    ;
>>
>>IMHO, of course.
>>
>>Regards,
>>Miguel
>
>Well, since the only reason for these constructs is either a bug or an intended
>side-effect, I consider both version approx equally terrible. :)

It is morning and I am drunk already. I agree with you, what I had in my mind
are examples using "while" rather than "if".

while (something())
   ;

It is not a favorite of mine but you can see it often. That is better
than

while (something());

Regards,
Miguel

>
>But then, the next version of C++ will probably declare the semicolon as an
>operator and it will also be overloadable one. ;)
>
>Sargon



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.