[LLVMbugs] [Bug 20679] New: GNU-style attributes in incorrect position
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 15 11:43:50 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20679
Bug ID: 20679
Summary: GNU-style attributes in incorrect position
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: aaron at aaronballman.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
According to the GCC documentation
(https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax):
---
For example,
void (__attribute__((noreturn)) ****f) (void);
specifies the type “pointer to pointer to pointer to pointer to non-returning
function returning void”. As another example,
char *__attribute__((aligned(8))) *f;
specifies the type “pointer to 8-byte-aligned pointer to char”. Note again that
this does not work with most attributes; for example, the usage of ‘aligned’
and ‘noreturn’ attributes given above is not yet supported.
---
If we wish to implement the documented (expected) behavior, we may need to
diagnose situations where GNU-style attribute placement laxity is currently
allowed. For instance, the aligned example above currently places the attribute
on the variable declaration instead of on the type, as expected.
So attributes in type position which apply only to declarations should warn and
attributes in declaration position which only apply to types should warn.
See further discussion in:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140811/112661.html
--
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/20140815/8d345e7e/attachment.html>
More information about the llvm-bugs
mailing list