diff --git a/Expression.pas b/Expression.pas index a66f0db..9cf0bb8 100644 --- a/Expression.pas +++ b/Expression.pas @@ -2287,7 +2287,9 @@ if token.kind in startExpression then begin else if opStack^.token.kind = _Alignofsy then doingAlignof := true; tType := TypeName; - if doingSizeof or doingAlignof then begin + Match(rparench,12); + if (doingSizeof and (token.kind <> lbracech)) or doingAlignof then + begin {handle a sizeof operator} op := opStack; @@ -2324,7 +2326,6 @@ if token.kind in startExpression then begin op^.next := opStack; opStack := op; end; {else} - Match(rparench,12); end {if} else begin new(op); {record the '('} diff --git a/cc.notes b/cc.notes index 671dafe..46e3f9f 100644 --- a/cc.notes +++ b/cc.notes @@ -1630,6 +1630,8 @@ If you use #pragma debug 0x0010 to enable stack check debug code, the compiler w 20. When using strict type checks, == or != comparisons between a function pointer and NULL or (void*)0 would cause a spurious error. +21. If the operand to sizeof was a compound literal that was not enclosed in parentheses, a spurious error would be reported. + -- Bugs from C 2.1.1 B3 that have been fixed in C 2.2.0 --------------------- 1. There were various bugs that could cause incorrect code to be generated in certain cases. Some of these were specific to certain optimization passes, alone or in combination.