[Lldb-commits] [lldb] r238283 - Changed Flags::clang_type_resolve_state to unsigned for gcc

Pavel Labath labath at google.com
Wed May 27 02:27:29 PDT 2015


Wouldn't it be better to disable the warning (-Wno-whatever) instead
of littering the codebase with ifdefs?

pl

On 27 May 2015 at 05:54, Vince Harron <vince at nethacker.com> wrote:
> Author: vharron
> Date: Tue May 26 23:54:36 2015
> New Revision: 238283
>
> URL: http://llvm.org/viewvc/llvm-project?rev=238283&view=rev
> Log:
> Changed Flags::clang_type_resolve_state to unsigned for gcc
>
> to work around a very noisy gcc warning
>
>
> Modified:
>     lldb/trunk/include/lldb/Symbol/Type.h
>
> Modified: lldb/trunk/include/lldb/Symbol/Type.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=238283&r1=238282&r2=238283&view=diff
> ==============================================================================
> --- lldb/trunk/include/lldb/Symbol/Type.h (original)
> +++ lldb/trunk/include/lldb/Symbol/Type.h Tue May 26 23:54:36 2015
> @@ -305,7 +305,12 @@ protected:
>      ClangASTType m_clang_type;
>
>      struct Flags {
> +#ifdef __GNUC__
> +        // using unsigned type here to work around a very noisy gcc warning
> +        unsigned        clang_type_resolve_state : 2;
> +#else
>          ResolveState    clang_type_resolve_state : 2;
> +#endif
>          bool            is_complete_objc_class   : 1;
>      } m_flags;
>
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list