C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
C4115
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler warning (levels 1 and 3) C4115
 
     'type' : named type definition in parentheses
 
     The given symbol was used to define a structure, union, or
     enumerated type inside a parenthetical expression. The scope
     of this definition may be unexpected.
 
     In a C function call, the definition has global scope. In a C++
     function call, the definition has the same scope as the function
     being called.
 
     This warning can also be caused by declarators within parentheses
     (such as prototypes) that are not parenthetical expressions.
 
     This is a level 1 warning with C++ programs or under the /Za ANSI-
     compatibility command-line option.  It is level 3 otherwise.
 
     The following example causes this warning:
 
          void func(struct S *);  /* warning */
 
     This warning can be avoided by declaring or defining the structure
     outside of the parentheses before the line that caused this
     warning, as in:
 
          struct S;
          void func(struct S *);
 
     or:
 
          struct S
          {
             int mem;
          };
          void func(struct S *);
                                    -♦-