[cfe-dev] invalid bits size for WrittenBuiltinSpecs::Type

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 13 11:59:25 PDT 2017


Thanks, fixed in r297654.

On Mon, Mar 13, 2017 at 10:35 AM, Vladimir Voskresensky via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello Clang Developers,
>
> in file clang/Basic/Specifiers.h there is
>    struct clang::WrittenBuiltinSpecs {
>      /*DeclSpec::TST*/ unsigned Type  : 5; // << must be *6*
> ....
>   };
>
> "Type" field must be 6 to match DeclSpec::TST which is the same as enum
> TypeSpecifierType
> which has
>  TST_error // erroneous type
> with value 43 which can not be kept in 5 bits field.
>
> as a correct example you can see that
> clang::DeclSpec::TypeSpecType field is 6 bits
>
> So, we corrupt values  during save in clang::DeclSpec::SaveWrittenBuiltinSpecs
> for all after TST_image1d_t.
> Btw, due to this TST_error is changed to TST_float128....
>
> Hope it helps,
> Vladimir.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170313/62beac7e/attachment.html>


More information about the cfe-dev mailing list