http://llvm.org/bugs/show_bug.cgi?id=19992
Bug ID: 19992
Summary: alignof(T[]) is not allowed
Product: clang
Version: 3.4
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Should alignof(T[]) be legal if T is a complete object type (and therefore T[]
is an "array thereof") according to the first statement in [expr.alignof]?
5.3.6 Alignof [expr.alignof]
1 An alignof expression yields the alignment requirement of its operand type.
The operand shall be a type-id representing a complete object type or an array
thereof or a reference to a complete object type.
2 The result is an integral constant of type std::size_t.
3 When alignof is applied to a reference type, the result shall be the
alignment of the referenced type. When alignof is applied to an array type, the
result shall be the alignment of the element type.
I observed that g++ permits it.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs