[LLVMbugs] [Bug 18148] New: clang should support arbitrary order of C++11 attributes and GCC-style attributes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Dec 5 11:14:59 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=18148
Bug ID: 18148
Summary: clang should support arbitrary order of C++11
attributes and GCC-style attributes
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
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>)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131205/690b4c57/attachment.html>
More information about the llvm-bugs
mailing list