Altera Nios II C2H Compiler Manuale Utente Pagina 126

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 138
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 125
7–2 9.1 Altera Corporation
Nios II C2H Compiler User Guide November 2009
Language
Escape character sequences in character constants are supported if
they are used as string literals rather than character constants.
The following declaration is supported because it employs a string
literal:
char *newline = "\n";
The following declaration is not supported because it employs a
character constant:
char newline = '\n';
Composite concatenation is not supported in initialization
statements.
The C2H Compiler does not support the initialization statement
which concatenates two strings, such as the following:
char s[] = "this" " string";
The following declaration is supported:
char s[] = "this string";
Bit-Field Declarations (Section 6.7.2.1)
Structs are supported; however, bit-field declarations used in packed
structs are not supported.
For example, the following packed struct defining a 3-bit field is not
supported:
struct my_struct
{
unsigned int tbits:3;
} ms;
ms.tbits = 0xFF;
You can use a mask of appropriate length to identify the significant bits:
struct my_struct
{
unsigned int tbits;
} ms;
ms.tbits = 0xFF & 7;
Vedere la pagina 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 137 138

Commenti su questo manuale

Nessun commento