From d60b593c8b1d19a4adfdadaeeaa93aa10b9dba53 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 24 Jan 2017 10:29:30 +0100 Subject: New version to support designators. The c standard allows member designators for offsetof. The current implementation works by recursively combining the offset of each of the member designators. For array access the size of the subtypes is multiplied by the index and for members the offset of the member is calculated. Bug 20765 --- cparser/Cabs.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Cabs.v') diff --git a/cparser/Cabs.v b/cparser/Cabs.v index 355c748e..b3e4ffda 100644 --- a/cparser/Cabs.v +++ b/cparser/Cabs.v @@ -142,7 +142,7 @@ with expression := (* Non-standard *) | EXPR_ALIGNOF : expression -> expression | TYPE_ALIGNOF : (list spec_elem * decl_type) -> expression - | BUILTIN_OFFSETOF : (list spec_elem * decl_type) -> string -> expression + | BUILTIN_OFFSETOF : (list spec_elem * decl_type) -> list initwhat -> expression with constant := (* The string is the textual representation of the constant in -- cgit