[Bug web/69356] New: Wrong description of compound literals for scalar types
christian.brauner at mailbox dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 19 12:00:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69356
Bug ID: 69356
Summary: Wrong description of compound literals for scalar
types
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: web
Assignee: unassigned at gcc dot gnu.org
Reporter: christian.brauner at mailbox dot org
Target Milestone: ---
In section 6.26 Compound Literals of the gcc manual it is stated that
"Compound literals for scalar types and union types are also allowed, but then
the compound literal is equivalent to a cast."
Which is either wrong or at least misleading. A cast does not yield an lvalue
whereas a compound literal for scalar types does. So either this line should go
into a little more detail as to how compound literals for scalar types and
unions are equivalent to casts or the subclause "but then the compound literal
is equivalent to a cast" should be dropped.
More information about the Gcc-bugs
mailing list