[cfe-commits] r140931 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/Parser/MicrosoftExtensions.c
John McCall
rjmccall at apple.com
Thu Oct 6 11:31:46 PDT 2011
On Oct 6, 2011, at 11:21 AM, Nico Weber wrote:
> this breaks the build of every project that uses glib and -Werror:
>
> In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34:
> /usr/include/glib-2.0/glib/gthread.h:348:27: error: 'may_alias'
> attribute ignored when parsing type
> if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
> ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/glib/gatomic.h:73:46: note: expanded from:
> (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void
> *) (atomic)))
> ^
> /usr/include/glib-2.0/glib/gmacros.h:111:43: note: expanded from:
> # define G_GNUC_MAY_ALIAS __attribute__((may_alias))
> ^
> /usr/include/glib-2.0/glib/gmacros.h:273:25: note: expanded from:
> #define G_LIKELY(expr) (expr)
> ^~~~
>
> Thoughts? Should this be a disablable warning?
All warnings should be disablable, but this specific problem should be fixed by making clang recognize may_alias.
John.
More information about the cfe-commits
mailing list