Patchwork [Darwin] Suppress build warnings about struct cl_decoded_option.

login
register
mail settings
Submitter IainS
Date Dec. 17, 2010, 11:20 a.m.
Message ID <2E37A09E-4E2C-47CD-BC56-F414386577B7@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/75861/
State New
Headers show

Comments

IainS - Dec. 17, 2010, 11:20 a.m.
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
Paolo Bonzini - Dec. 17, 2010, 12:08 p.m.
On 12/17/2010 12:20 PM, IainS wrote:
>
> 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

Go ahead, I'd say.

Paolo

Patch

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)