Altera Nios II C2H Compiler Instrukcja Użytkownika Strona 126

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 138
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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;
Przeglądanie stron 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 137 138

Komentarze do niniejszej Instrukcji

Brak uwag