[Openmp-dev] anonymous structs are a GNU extension

C Bergström cbergstrom at pathscale.com
Wed Jun 3 22:43:32 PDT 2015


I don't like this patch - Using one compiler specific extension to
silence another compiler specific extension doesn't make sense to me.
While compilers that don't support this will probably ignore it, it
doesn't actual solve the problem.

If you really don't want the warning for clang - I think there's a way
in the cmake build to pass a clang specific flag to silence it.

Thanks


On Thu, Jun 4, 2015 at 6:30 AM, Jack Howarth
<howarth.mailing.lists at gmail.com> wrote:
> Jonathan,
>        Currently the openmp build using the clang compiler emits
> warnings from the use of the anonymous structs GNU extension ...
>
> In file included from
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_ftn_cdecl.c:16:
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp.h:1420:5:
> warning: anonymous structs are a GNU extension
> [-Wgnu-anonymous-struct]
>     struct KMP_ALIGN( 32 ) { // AC: changed 16 to 32 in order to
> simplify template
>     ^
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp.h:1454:5:
> warning: anonymous structs are a GNU extension
> [-Wgnu-anonymous-struct]
>     struct KMP_ALIGN( 32 ) {
>     ^
> /sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp.h:1685:5:
> warning: anonymous structs are a GNU extension
> [-Wgnu-anonymous-struct]
>     struct {
>     ^
>
> The attached patch adds pragma clang diagnostic statements 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
>



More information about the Openmp-dev mailing list