diff --git a/Expression.pas b/Expression.pas index 07752a8..e0814e4 100644 --- a/Expression.pas +++ b/Expression.pas @@ -3011,11 +3011,13 @@ case tree^.token.kind of kind := lType^.kind; GenerateCode(tree^.right); if expressionType^.kind <> scalarType then - if tree^.token.kind in [pluseqop,minuseqop] then - Error(66); + Error(66); if tree^.token.kind in [gtgteqop,ltlteqop] then if kind = scalarType then if expressionType^.kind = scalarType then begin + if expressionType^.baseType in + [cgReal,cgDouble,cgComp,cgExtended,cgVoid] then + Error(66); et := UsualUnaryConversions; if et <> Unary(ltype^.baseType) then begin Gen2(pc_cnv, et, ord(Unary(ltype^.baseType))); diff --git a/cc.notes b/cc.notes index 6a4a913..2b74ba9 100644 --- a/cc.notes +++ b/cc.notes @@ -998,6 +998,8 @@ int foo(int[42]); 128. The ++ and -- operators often would not work correctly on bit-fields, or on floating-point values that were in a structure or were accessed via a pointer. +129. Certain invalid compound assignment expressions were erroneously permitted. + -- Bugs from C 2.1.0 that have been fixed ----------------------------------- 1. In some situations, fread() reread the first 1K or so of the file.