<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 --- - incorrect warning "missing exception specification 'throw()'""
   href="http://llvm.org/bugs/show_bug.cgi?id=17110">17110</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>incorrect warning "missing exception specification 'throw()'"
          </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>Linux
          </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>clang@martinien.de
          </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>Hi,

for this program:

void __attribute__ ((__noreturn__)) f();

void __attribute__ ((__noreturn__)) exit(int status) throw();

void exit(int status) throw()
{
    f();
}

I get the following warning:

clang++ -c warn.cpp
warn.cpp:5:6: warning: 'exit' is missing exception specification 'throw()'
void exit(int status) throw()
     ^
                              throw()
warn.cpp:3:37: note: previous declaration is here
void __attribute__ ((__noreturn__)) exit(int status) throw();
                                    ^
1 warning generated.


Adding __attribute__ ((__noreturn__)) to the definition of exit() gets rid of
the warning. But is this required at all? Either way, it should not warn about
the throw().

<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - bad interaction bt attribute noreturn and throw specification"
   href="show_bug.cgi?id=8829">Bug 8829</a> looks very similar.

Best regards,
Martin</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>