public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r10-10805] C-family : Fix a C++ ODR violation [PR97854].
Date: Tue, 31 May 2022 18:13:41 +0000 (GMT)	[thread overview]
Message-ID: <20220531181341.27D1B3857B82@sourceware.org> (raw)

https://gcc.gnu.org/g:5dd5507265e3b7fecd775a106a20762a5e828421

commit r10-10805-g5dd5507265e3b7fecd775a106a20762a5e828421
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Mon Nov 16 19:33:35 2020 +0000

    C-family : Fix a C++ ODR violation [PR97854].
    
    The changes in r11-4799 introduced a dummy enum rid type with
    a different initial member name to the actual version (an ODR
    violation).  Fixed by including the header declaring the
    actual type.
    
    gcc/c-family/ChangeLog:
    
            PR objc/97854
            * stub-objc.c: Include c-common.h to declare enum rid.
    
    (cherry picked from commit 814e016318646d06b1662219cc716d502b76d8ce)

Diff:
---
 gcc/c-family/stub-objc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c
index 2f535578789..f9fe66abb99 100644
--- a/gcc/c-family/stub-objc.c
+++ b/gcc/c-family/stub-objc.c
@@ -25,10 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "vec.h"
 
-/* Provide a dummy type for the RID enum used as an argument to
-   objc_prop_attr_kind_for_rid () */
-enum rid { DUMMY };
-
+#include "c-common.h" /* for enum rid.  */
 #include "c-objc.h"
 
 tree


                 reply	other threads:[~2022-05-31 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220531181341.27D1B3857B82@sourceware.org \
    --to=iains@gcc.gnu.org \
    --cc=gcc-cvs@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: link
Be 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).