]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
C-family : Fix a C++ ODR violation [PR97854].
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 16 Nov 2020 19:33:35 +0000 (19:33 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 31 May 2022 18:13:15 +0000 (19:13 +0100)
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)

gcc/c-family/stub-objc.c

index 2f535578789712c987d457cbdb319f8c9d3d8aef..f9fe66abb991fb82f4c5245469a7f8091bc505d3 100644 (file)
@@ -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