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.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to