C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
C2390
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2390
 
     'identifier' : incorrect storage class 'specifier'
 
     The storage class was not legal for the specified identifer with
     global scope.
 
     The default storage class for this context was used in place of
     the illegal class.
 
     Correct use of storage classes include:
 
        ■ If the identifier is a function, it should be declared with
          extern storage.
 
        ■ If the identifier is a formal parameter or local variable,
          it should be declared with auto storage.
 
        ■ If the identifier is a global variable, it should be
          declared with no storage class (that is, auto storage).
 
     The following example generates this error:
 
          register int i;        //error
          void main ()
          {
             register int j;     //OK
          }
                                    -♦-