ARM VERSION 1.2 Fiche technique Page 76

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 276
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 75
ARM Compiler Reference
3-20 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
Example 3-6 Linkage specification
extern const int z; /* in read-only segment, cannot */
/* be dynamically initialized */
extern "C++:read/write" const int y; /* in read/write segment */
/* can be dynamically initialized */
extern "C++:read/write" {
const int i=5; /* placed in read-only segment, */
/* not extern because implicitly static */
extern const T x=6; /* placed in read/write segment */
struct S {
static const T T x; /* placed in read/write segment */
};
}
Constant objects must not be redeclared with another linkage. The code in Example 3-7
produces a compile error.
Example 3-7 Compiler error
extern "C++" const T x;
extern "C++:read/write" const T x; /* error */
Note
Because C does not have the linkage specifications, you cannot use a
const
object
declared in C++ as
extern "C++:read/write"
from C.
Vue de la page 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 275 276

Commentaires sur ces manuels

Pas de commentaire