Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to get rid of remarks of the intel compiler

Author: Robert Hyatt

Date: 12:45:27 01/08/03

Go up one level in this thread


On January 07, 2003 at 09:16:21, Uri Blass wrote:

>I get a lot of remarks by the intel compiler
>
>Here are some kind of remarks:
>
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stdio.h(97): remark #344:
>typedef name has already been declared (with same type)
>  typedef char *  va_list;
>                  ^
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stdio.h(233): remark #193:
>zero used for undefined preprocessing identifier
>  #if     !__STDC__ && _INTEGRAL_MAX_BITS >= 64
>           ^
>C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stdio.h(443): remark #193:
>zero used for undefined preprocessing identifier
>  #if     !__STDC__ && !defined(_POSIX_)
>           ^
>
>
>I did not write stdio.h so what does the intel compiler want from me?
>
>
>2)I get a lot of remarks for movei and the most popular remark is
>
>external definition with no prior declaration
>
>Do I need to declare function before I use it.

Yes you must.

>The problem is that intel tell me the same remark also about varaibles that I
>declare in the files data.c
>
>I think that it is only a waste of time unless I want to use the function in
>places that it is not defined.
>
>3)remark #810: conversion from "int" to "char" may lose significant bits
>      piece=(char)(position[i]+'a'-'A');
>
>What does the compiler want from me?






>
>position[i] is char(a big letter and I simply translate it to a small letter).

Much better:

piece=tolower(position[i]);

Much more readable.



>
>4)last line of file ends without a newline

_every_ source line must end with a newline.  Easiest way to be sure this
happens
is to have a _blank_ line on the end of every file...

>
>What intel wants from me(this remark is also about a comment that I made after
>the end of the file data.c
>I thought to declare a varaible but did not do it so in order not to forget my
>thought I added the declaration to a comment.
>
>5)operands are evaluated in unspecified order
>
>It is not my fault that the intel compiler does not know that the order of
>adding is not important because it does not know that calculating one expression
>does not change the second expression.
>
>Uri

The order _is_ specific.  That usually means you are mixing operators of
difference
precedence without using () to specify your chosen order of evaluation.  Just
add
the parens to avoid some _ugly_ errors...






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.