diff mbox series

[pushed] C-family : Fix a C++ ODR violation [PR97854].

Message ID 4EA05900-68CC-4AFA-871F-45E030C4EADF@sandoe.co.uk
State New
Headers show
Series [pushed] C-family : Fix a C++ ODR violation [PR97854]. | expand

Commit Message

Iain Sandoe Nov. 16, 2020, 9:41 p.m. UTC
Hi

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.

tested  --with-build-config=bootstrap-lto on Linux and
--with-build-config=bootstrap-lto-noplugin on Darwin,
pushed to master,
thanks
Iain

gcc/c-family/ChangeLog:

	PR objc/97854
	* stub-objc.c: Include c-common.h to declare enum rid.
---
  gcc/c-family/stub-objc.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c
index 26941aa2cb4..1914432678e 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