<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 --- - clang should support arbitrary order of C++11 attributes and GCC-style attributes"
   href="http://llvm.org/bugs/show_bug.cgi?id=18148">18148</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang should support arbitrary order of C++11 attributes and GCC-style attributes
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>jonathan.sauer@gmx.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>The following code (which merely declares two functions) fails to compile with
clang r196506:

__attribute__((__noinline__)) [[noreturn]] void foo();

[[noreturn]] __attribute__((__noinline__)) void bar();


This results in:

% ~/LLVM/build/Release+Asserts/bin/clang++ -c -std=c++11 clang.cpp
clang.cpp:1:31: error: an attribute list cannot appear here
__attribute__((__noinline__)) [[noreturn]] void foo();
                              ^~~~~~~~~~~~
1 error generated.


clang however only complains about "foo", not about "bar", where the order of
GCC-style attribute and C++11-style attribute is reversed. Unless there is a
need to require C++11-style attributes first and GCC-style attributes second,
clang should support both orderings. (and possibly arbitrary orderings like
<gcc attr> <c++11 attr> <gcc attr>)</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>