[Openmp-dev] missing field 'flags' initializer

Churbanov, Andrey Andrey.Churbanov at intel.com
Wed Jun 3 11:40:39 PDT 2015


C and C++ standards require the initialization to be completed with zero-initialization, so it is unclear why compiler issues the warning here?  Or am I missing something?

Anyway, we can add one more 0 to the initializer-list to make the compiler happy.

- Andrey

> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu [mailto:openmp-dev-
> bounces at cs.uiuc.edu] On Behalf Of Jack Howarth
> Sent: Wednesday, June 03, 2015 8:25 PM
> To: Peyton, Jonathan L; openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: [Openmp-dev] missing field 'flags' initializer
> 
> Jonathan,
>       Another interesting warning that repeats several times during the openmp
> build is...
> 
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-
> 3.7.0.src/projects/openmp/runtime/src/kmp_itt.inl:64:46:
> warning: missing field 'flags' initializer [-Wmissing-field-initializers] static
> kmp_bootstrap_lock_t  metadata_lock = KMP_BOOTSTRAP_LOCK_INITIALIZER(
> metadata_lock );
>                                              ^
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-
> 3.7.0.src/projects/openmp/runtime/src/kmp_lock.h:501:48:
> note: expanded from macro 'KMP_BOOTSTRAP_LOCK_INITIALIZER'
> #define KMP_BOOTSTRAP_LOCK_INITIALIZER( lock )
> KMP_TICKET_LOCK_INITIALIZER( (lock) )
>                                                ^
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-
> 3.7.0.src/projects/openmp/runtime/src/kmp_lock.h:262:99:
> note: expanded from macro 'KMP_TICKET_LOCK_INITIALIZER'
> #define KMP_TICKET_LOCK_INITIALIZER( lock ) { { (kmp_ticket_lock_t *) &
> (lock), NULL, 0, 0, 0, -1 } }
> 
>                            ^
> In file included from
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-
> 3.7.0.src/projects/openmp/runtime/src/kmp_settings.c:20:
> In file included from
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-
> 3.7.0.src/projects/openmp/runtime/src/kmp_itt.h:286:
> 
> It's not clear to me what needs to be done to suppress these warnings.
>             Jack
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev

--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the Openmp-dev mailing list