X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCC.y;fp=src%2FSDCC.y;h=aae308d1e4db81a653b71fc7b79c9922d7565434;hb=a646dcff1ba10145839a6724656269ab5261d99a;hp=1cdbd6ca054bb45d6a6daedba44282095135a06a;hpb=1490f18f98ce44779cb1d944d0f947a9c4082e74;p=fw%2Fsdcc diff --git a/src/SDCC.y b/src/SDCC.y index 1cdbd6ca..aae308d1 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -909,9 +909,9 @@ struct_declarator_list struct_declarator : declarator | ':' constant_expr { - int bitsize; + unsigned int bitsize; $$ = newSymbol (genSymName(NestLevel),NestLevel) ; - bitsize= (int) floatFromVal(constExprValue($2,TRUE)); + bitsize= (unsigned int) floatFromVal(constExprValue($2,TRUE)); if (bitsize > (port->s.int_size * 8)) { bitsize = port->s.int_size * 8; werror(E_BITFLD_SIZE, bitsize); @@ -922,8 +922,8 @@ struct_declarator } | declarator ':' constant_expr { - int bitsize; - bitsize= (int) floatFromVal(constExprValue($3,TRUE)); + unsigned int bitsize; + bitsize= (unsigned int) floatFromVal(constExprValue($3,TRUE)); if (bitsize > (port->s.int_size * 8)) { bitsize = port->s.int_size * 8; werror(E_BITFLD_SIZE, bitsize);