Altera Nios II C2H Compiler Manual de usuario Pagina 127

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 138
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 126
Altera Corporation 9.1 7–3
November 2009 Nios II C2H Compiler User Guide
ANSI C Compliance and Restrictions
Array Initialization (Section 6.7.8, Paragraph 3)
Array initialization is supported; however, the array size must be
established before initializing individual elements of the array.
The following code, which assigns a single element of an array without
establishing its size, is not supported:
int a[] = {[5]=2};
The following initialization, which establishes the array size before
initializing a single element, is supported:
int a[6]; /* establish array size */
a[5]=2; /* assign element 5 */
It is also possible to initialize the entire array with a single statement, as
follows:
int a[6]={0,0,0,0,0,2}; /* init a[]*/
int b[]={0,0,0,0,0,2}; /* init b[]*/
Delayed Declaration
The C2H Compiler does not support delayed declaration of variables.
For example, the following code, which first declares an array of
unspecified size and later provides the size, is not supported:
int a[];
int a[20];
You can establish the size of the array when it is declared:
int a[20];
Expressions
The C2H Compiler does not support the following C operators.
Unary Operator (Address Operator) (Section 6.5.3.2, Paragraph 1)
The unary & operator used as an address operator is not supported.
Vista de pagina 126
1 2 ... 122 123 124 125 126 127 128 129 130 131 132 ... 137 138

Comentarios a estos manuales

Sin comentarios