public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65106] C99 intialization of struct with const member through a non-const pointer Date: Wed, 18 Feb 2015 14:27:00 -0000 [thread overview] Message-ID: <bug-65106-4-mS99FWkkQs@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65106-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65106 --- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- See the definition of "modifiable lvalue" (6.3.2.1#1): "... if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a const-qualified type". (Together with 6.5.16#2 "An assignment operator shall have a modifiable lvalue as its left operand.".) (It is however valid to pass arguments and return values of such types, notwithstanding references to assignment in such contexts; see DR#427.)
next prev parent reply other threads:[~2015-02-18 14:27 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-18 13:28 [Bug c/65106] New: " andrii.riabushenko at barclays dot com 2015-02-18 14:27 ` joseph at codesourcery dot com [this message] 2015-02-19 14:51 ` [Bug c/65106] " andrii.riabushenko at barclays dot com 2015-02-19 15:00 ` redi at gcc dot gnu.org 2015-10-22 9:17 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65106-4-mS99FWkkQs@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).