<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - declspec/attribute deprecated does not give a warning for nested anonymous classes"
   href="http://llvm.org/bugs/show_bug.cgi?id=20930">20930</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>declspec/attribute deprecated does not give a warning for nested anonymous classes
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sunil_srivastava@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following example gives warnings 'is deprecated' for A[xy] and C[xy], 
but not for B[xy]. 

struct {
  __declspec(deprecated("deprecated A")) int Ax;
  int Ay __attribute((deprecated));

  struct { __declspec(deprecated("deprecated B")) int Bx; };
  struct { int By __attribute((deprecated)); };

  struct {
    __declspec(deprecated("deprecated C")) int Cx;
    int Cy __attribute((deprecated));
  } c;
} foo ;
void bar();
void bar() {
  foo.Ax = foo.Ay;
  foo.Bx = foo.By;
  foo.c.Cx = foo.c.Cy;
}

$ clang++ -Weverything -S -p.cpp
p.cpp:5:3: warning: anonymous structs are a GNU extension
[-Wgnu-anonymous-struct]
  struct { __declspec(deprecated("deprecated B")) int Bx; };
  ^
p.cpp:6:3: warning: anonymous structs are a GNU extension
[-Wgnu-anonymous-struct]
  struct { int By __attribute((deprecated)); };
  ^
p.cpp:15:7: warning: 'Ax' is deprecated: deprecated A
[-Wdeprecated-declarations]
  foo.Ax = foo.Ay;
      ^
p.cpp:2:46: note: 'Ax' has been explicitly marked deprecated here
  __declspec(deprecated("deprecated A")) int Ax;
                                             ^
p.cpp:15:16: warning: 'Ay' is deprecated [-Wdeprecated-declarations]
  foo.Ax = foo.Ay;
               ^
p.cpp:3:7: note: 'Ay' has been explicitly marked deprecated here
  int Ay __attribute((deprecated));
      ^
p.cpp:17:9: warning: 'Cx' is deprecated: deprecated C
[-Wdeprecated-declarations]
  foo.c.Cx = foo.c.Cy;
        ^
p.cpp:9:48: note: 'Cx' has been explicitly marked deprecated here
    __declspec(deprecated("deprecated C")) int Cx;
                                               ^
p.cpp:17:20: warning: 'Cy' is deprecated [-Wdeprecated-declarations]
  foo.c.Cx = foo.c.Cy;
                   ^
p.cpp:10:9: note: 'Cy' has been explicitly marked deprecated here
    int Cy __attribute((deprecated));
        ^
6 warnings generated.
$


This is in TOT as of svn r217698.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>