This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69356] compound literals for scalar types are still lvalues unlike casts
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2016 08:23:36 +0000
- Subject: [Bug c/69356] compound literals for scalar types are still lvalues unlike casts
- Auto-submitted: auto-generated
- References: <bug-69356-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69356
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-10-07
Summary|Wrong description of |compound literals for
|compound literals for |scalar types are still
|scalar types |lvalues unlike casts
Ever confirmed|0 |1
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Christian Brauner from comment #0)
> 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
It did in older versions of GCC as an extension (maybe undocumented). So I
suspect when that extension was removed; this wording was not changed.