Renesas TM V.3.20A Especificaciones Pagina 94

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 762
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 93
Renesas Technology, Tools FAQs
Last Updated: August 7, 2000
Document Number: 01051268_e
Q.
I upgraded the NC30WA with a version later than V.3.20 Release 1, and then I started getting a warning. I am concerned that there
may be something wrong in my program.
A.
This warning indicates that the compiler successfully compiled your C program but the object codes may cause a malfunction. The
following describes the two types of warning messages, the reasons they are issued, and the possible problems that may occur.
Warning(ccom): invalid return type
This warning indicates that the return value of a function may be unknown. This will not cause any problems if the return
value is not used in the caller function. But if the return value is used, you need to make sure that an undetermined return
value won't cause a problem in your program.
1.
Warning(ccom): assignment from const pointer to non-const pointer
This warning indicates you are trying to do an "implicit variable type conversion", to input [constant far pointer to the
constants] to [far pointer to the variable] which the compiler thinks it is invalid. If the CPU executes the above operation, the
CPU may perform a write-operation at the address indicating a constant area. Therefore, the compiler sends a warning to you
to make sure a write-operation does not happen at the destination address indicated by the subject pointer.
2.
To prevent this message from being generated, input the pointer after executing the type conversion (cast) on the constant pointer.
[Program Example with Cast Execution]
uchar *addr;
uchar offset;
const uchar * const d_fig[] =
{
000,001,002,003
}
func()
{
addr = (uchar *)d_fig[offset];
}
[Program Example with Warning Generation]
uchar *addr;
uchar offset;
const uchar * const d_fig[] =
{
000,001,002,003
}
func()
{
addr = d_fig[offset]; /* The warning is generated */
}
Top of Page | Back to Previous Page
Vista de pagina 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 761 762

Comentarios a estos manuales

Sin comentarios