This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Darwin] Suppress build warnings about struct cl_decoded_option.



On 17 Dec 2010, at 10:55, Paolo Bonzini wrote:


On 12/17/2010 11:22 AM, IainS wrote:
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 167881)
+++ gcc/config/darwin.h (working copy)
@@ -963,10 +968,10 @@ __enable_execute_stack (void *addr)

#define TARGET_HAS_TARGETCM 1

-extern void darwin_driver_init (unsigned int *decoded_options_count,
- struct cl_decoded_option **decoded_options);

Can't you just add a "struct cl_decoded_option;" forward reference before the extern?
doh!
... which would qualify as obvious ( except to me, apparently ;-) )...
OK?
Iain


Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 167976) +++ gcc/config/darwin.h (working copy) @@ -963,8 +968,8 @@ __enable_execute_stack (void *addr)

#define TARGET_HAS_TARGETCM 1

-extern void darwin_driver_init (unsigned int *decoded_options_count,
- struct cl_decoded_option **decoded_options);
+struct cl_decoded_option;
+extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **);
#define GCC_DRIVER_HOST_INITIALIZATION \
darwin_driver_init (&decoded_options_count, &decoded_options)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]