DSPRelated.com
Forums

C6000: C/C++ Compiler Diagnostic Messages

Started by Meidad Raz July 16, 2002
Hi

Can anyone direct me where can I find a more detailed explanations for the
C/C++ Compiler Diagnostic Messages(i mean error,warnings and remarks).
TI has explanations for her ASM and Linker error messages in a manual :
TMS320C6000 Assembly Language Tools User's guide (spru186i.pdf) , but i
couldn't find the same thing for the C Compiler.
I suppose that most of them are common to any C compiler and not specific to
the TI compiler, but still i dont know where to look for it.
tnx Meidad Raz



> Can anyone direct me where can I find a more detailed explanations for the
> C/C++ Compiler Diagnostic Messages(i mean error,warnings and remarks).
> TI has explanations for her ASM and Linker error messages in a manual :
> TMS320C6000 Assembly Language Tools User's guide (spru186i.pdf) , but i
> couldn't find the same thing for the C Compiler.
> I suppose that most of them are common to any C compiler and not specific
> to the TI compiler, but still i dont know where to look for it.


Please clarify: Aside from the message that imply a garbage input stream
('expected a statement', etc.) I've found the error messages from the
compiler itself are pretty explanatory ('too many initializer values' ...
remove some). Are you looking for a C/C++ programming guide to help
understand why the messages were generated according to the language?


thank you for your reply

i noticed that i get the remark "controlling expression is constant" every
time i use a macro like :

"mcbsp_ut.c", line 16: remark #238-D:
MCBSP_TX_RESET(DLB_TST__SER_CHAN_NUM); //
Reset Tx channel

is there a cleaner way of doing a constant assignment like for exam :

#define RESET_PORT(PORT_ADD) (*PORT_ADD |= 0x1) -----Original Message-----
From: C.W. [mailto:]
Sent: Wednesday, July 17, 2002 8:13 PM
To: Meidad Raz
Subject: RE: [c6x] RE: C6000: C/C++ Compiler Diagnostic Messages At 09:27 AM 7/17/2002 +0200, you wrote:
>yes , i'm looking for more information about these messages , in order to
>better understand what make the compiler generete them.
>I'm especialy talking about the warning and the remarks he generate, since
>most of the error are more easy to solve and understand.
>
>for example:


Well, first, you have remarks turned on, so you'll get messages that really
are remarks...like "I noticed that the controlling expression is a
constant", below. These are just unusual items the compiler is remarking
about. They may or may not be a real issue, but are often signs of places
where the code can be improved. >1) "vtrb_if.c", line 180: remark #238-D: controlling expression is
constant
> for(i=0;i<(VIT_IF__TX_BUF_SIZE*8)-3;i+=6)


Well, I cannot tell for sure without looking at other parts of your
program, but the compiler thinks the expression i<(VIT_IF__TX_BUF_SIZE*8)-3
is constant, i.e. unchanging, i.e. will always give the same answer to
matter what your program does, and this is unusual because why are you
bothering to test something that cannot change.

This is the same as if you said "if (1<2) ...", which is a constant
controlling expression, as 1 is always less than 2.

Preprocess the source file (-ppo) and look at that line and see what it
says. >2) "vtrb_if.c", line 166: remark #225-D: function declared implicitly
> vit_enc__encode(Cfg);


No prototype; the function is declared implicitly with default types rather
than with an explicit declaration by the developer. It's parameters might
not be passed correctly. Add a declaration that is in scope at line 166.

-W