aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-11-21 11:16:42 +0100
committerCyril SIX <cyril.six@kalray.eu>2018-11-21 11:16:42 +0100
commitb873e06abcee1c7f6a51aaabb973b550a52a5b61 (patch)
tree70ccd9c7cbba08e20b782217b1a2268b1afce3e9 /cparser
parent65db9a4a02c30d8dd5ca89b6fe3e4524cd4c29a5 (diff)
parenteb7bd26e2b9eeed21d204bad26fa56c8a7937ffb (diff)
downloadcompcert-kvx-b873e06abcee1c7f6a51aaabb973b550a52a5b61.tar.gz
compcert-kvx-b873e06abcee1c7f6a51aaabb973b550a52a5b61.zip
Merge tag 'v3.4' into mppa_k1c
Conflicts: .gitignore
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Bitfields.ml60
-rw-r--r--cparser/C.mli5
-rw-r--r--cparser/Cabs.v3
-rw-r--r--cparser/Ceval.ml104
-rw-r--r--cparser/Ceval.mli2
-rw-r--r--cparser/Cflow.ml2
-rw-r--r--cparser/Checks.ml1
-rw-r--r--cparser/Cleanup.ml11
-rw-r--r--cparser/Cprint.ml3
-rw-r--r--cparser/Cutil.ml197
-rw-r--r--cparser/Cutil.mli20
-rw-r--r--cparser/Diagnostics.ml34
-rw-r--r--cparser/Diagnostics.mli6
-rw-r--r--cparser/Elab.ml985
-rw-r--r--cparser/ExtendedAsm.ml4
-rw-r--r--cparser/GNUmakefile4
-rw-r--r--cparser/Lexer.mll8
-rw-r--r--cparser/Machine.ml14
-rw-r--r--cparser/Machine.mli4
-rw-r--r--cparser/MenhirLib/Alphabet.v (renamed from cparser/validator/Alphabet.v)0
-rw-r--r--cparser/MenhirLib/Automaton.v (renamed from cparser/validator/Automaton.v)0
-rw-r--r--cparser/MenhirLib/Grammar.v (renamed from cparser/validator/Grammar.v)0
-rw-r--r--cparser/MenhirLib/Interpreter.v (renamed from cparser/validator/Interpreter.v)0
-rw-r--r--cparser/MenhirLib/Interpreter_complete.v (renamed from cparser/validator/Interpreter_complete.v)16
-rw-r--r--cparser/MenhirLib/Interpreter_correct.v (renamed from cparser/validator/Interpreter_correct.v)0
-rw-r--r--cparser/MenhirLib/Interpreter_safe.v (renamed from cparser/validator/Interpreter_safe.v)0
-rw-r--r--cparser/MenhirLib/Main.v (renamed from cparser/validator/Main.v)0
-rw-r--r--cparser/MenhirLib/Tuples.v (renamed from cparser/validator/Tuples.v)0
-rw-r--r--cparser/MenhirLib/Validator_complete.v (renamed from cparser/validator/Validator_complete.v)0
-rw-r--r--cparser/MenhirLib/Validator_safe.v (renamed from cparser/validator/Validator_safe.v)0
-rw-r--r--cparser/PackedStructs.ml44
-rw-r--r--cparser/Parse.ml2
-rw-r--r--cparser/Parser.vy8
-rw-r--r--cparser/Rename.ml2
-rw-r--r--cparser/Unblock.ml2
-rw-r--r--cparser/deLexer.ml1
-rw-r--r--cparser/handcrafted.messages1123
-rw-r--r--cparser/pre_parser.mly1
38 files changed, 1647 insertions, 1019 deletions
diff --git a/cparser/Bitfields.ml b/cparser/Bitfields.ml
index baf2b0ec..696a9a8d 100644
--- a/cparser/Bitfields.ml
+++ b/cparser/Bitfields.ml
@@ -40,7 +40,11 @@ type bitfield_info =
0 < pos + sz <= bitsizeof(int)
*)
-(* Mapping (struct identifier, bitfield name) -> bitfield info *)
+let carrier_field bf =
+ { fld_name = bf.bf_carrier; fld_typ = bf.bf_carrier_typ;
+ fld_bitfield = None; fld_anonymous = false }
+
+(* Mapping (struct/union identifier, bitfield name) -> bitfield info *)
let bitfield_table =
(Hashtbl.create 57: (ident * string, bitfield_info) Hashtbl.t)
@@ -49,6 +53,13 @@ let is_bitfield structid fieldname =
try Some (Hashtbl.find bitfield_table (structid, fieldname))
with Not_found -> None
+(* Mapping struct/union identifier -> list of members after transformation,
+ including the carrier fields, but without the bit fields.
+ structs and unions containing no bit fields are not put in this table. *)
+
+let composite_transformed_members =
+ (Hashtbl.create 57: (ident, C.field list) Hashtbl.t)
+
(* Signedness issues *)
let unsigned_ikind_for_carrier nbits =
@@ -179,9 +190,16 @@ let rec transf_union_members env id count = function
:: transf_union_members env id (count + 1) ms)
let transf_composite env su id attr ml =
- match su with
- | Struct -> (attr, transf_struct_members env id 1 ml)
- | Union -> (attr, transf_union_members env id 1 ml)
+ if List.for_all (fun f -> f.fld_bitfield = None) ml then
+ (attr, ml)
+ else begin
+ let ml' =
+ match su with
+ | Struct -> transf_struct_members env id 1 ml
+ | Union -> transf_union_members env id 1 ml in
+ Hashtbl.add composite_transformed_members id ml';
+ (attr, ml')
+ end
(* Bitfield manipulation expressions *)
@@ -336,12 +354,25 @@ let rec transf_struct_init id fld_init_list =
| Some bf ->
let (el, rem') =
pack_bitfield_init id bf.bf_carrier fld_init_list in
- ({fld_name = bf.bf_carrier; fld_typ = bf.bf_carrier_typ;
- fld_bitfield = None; fld_anonymous = false},
+ (carrier_field bf,
Init_single {edesc = ECast(bf.bf_carrier_typ, or_expr_list el);
etyp = bf.bf_carrier_typ})
:: transf_struct_init id rem'
+(* Add default initialization for carrier fields that are not listed in the output of
+ [transf_struct_init]. This happens with carrier fields that contain no named
+ bitfields, only anonymous bitfields. *)
+
+let rec completed_struct_init env actual expected =
+ match actual, expected with
+ | [], [] -> []
+ | (f_a, i) :: actual', f_e :: expected' when f_a.fld_name = f_e.fld_name ->
+ (f_a, i) :: completed_struct_init env actual' expected'
+ | _, f_e :: expected' ->
+ (f_e, default_init env f_e.fld_typ) :: completed_struct_init env actual expected'
+ | _, [] ->
+ assert false
+
(* Check whether a field access (e.f or e->f) is a bitfield access.
If so, return carrier expression (e and *e, respectively)
and bitfield_info *)
@@ -503,8 +534,19 @@ and transf_init env i =
| Init_struct(id, fld_init_list) ->
let fld_init_list' =
List.map (fun (f, i) -> (f, transf_init env i)) fld_init_list in
- Init_struct(id, transf_struct_init id fld_init_list')
- | Init_union(id, fld, i) -> Init_union(id, fld, transf_init env i)
+ begin match Hashtbl.find composite_transformed_members id with
+ | exception Not_found ->
+ Init_struct(id, fld_init_list')
+ | ml ->
+ Init_struct(id, completed_struct_init env (transf_struct_init id fld_init_list') ml)
+ end
+ | Init_union(id, fld, i) ->
+ let i' = transf_init env i in
+ match is_bitfield id fld.fld_name with
+ | None ->
+ Init_union(id, fld, i')
+ | Some bf ->
+ Init_union(id, carrier_field bf, Init_single (bitfield_initializer bf i'))
(* Declarations *)
@@ -528,6 +570,8 @@ let transf_fundef env f =
(* Programs *)
let program p =
+ Hashtbl.clear bitfield_table;
+ Hashtbl.clear composite_transformed_members;
Transform.program
~composite:transf_composite
~decl: transf_decl
diff --git a/cparser/C.mli b/cparser/C.mli
index cacdbe7c..cc8d4065 100644
--- a/cparser/C.mli
+++ b/cparser/C.mli
@@ -85,9 +85,10 @@ type attributes = attribute list
(** Storage classes *)
type storage =
- | Storage_default
+ | Storage_default (* used for toplevel names without explicit storage *)
| Storage_extern
| Storage_static
+ | Storage_auto (* used for block-scoped names without explicit storage *)
| Storage_register
(** Unary operators *)
@@ -219,7 +220,7 @@ and stmt_desc =
and slabel =
| Slabel of string
- | Scase of exp
+ | Scase of exp * int64
| Sdefault
(** Declarations *)
diff --git a/cparser/Cabs.v b/cparser/Cabs.v
index b3e4ffda..5865ab69 100644
--- a/cparser/Cabs.v
+++ b/cparser/Cabs.v
@@ -140,8 +140,7 @@ with expression :=
| MEMBEROFPTR : expression -> string -> expression
(* Non-standard *)
- | EXPR_ALIGNOF : expression -> expression
- | TYPE_ALIGNOF : (list spec_elem * decl_type) -> expression
+ | ALIGNOF : (list spec_elem * decl_type) -> expression
| BUILTIN_OFFSETOF : (list spec_elem * decl_type) -> list initwhat -> expression
with constant :=
diff --git a/cparser/Ceval.ml b/cparser/Ceval.ml
index c3d7eeeb..58dea5f4 100644
--- a/cparser/Ceval.ml
+++ b/cparser/Ceval.ml
@@ -13,7 +13,7 @@
(* *)
(* *********************************************************************)
-(* Evaluation of compile-time constants *)
+(* Evaluation and recognition of compile-time constants *)
open C
open Cutil
@@ -103,7 +103,7 @@ let cast env ty_to v =
else raise Notconst
| TPtr(ty, _), I n ->
I (normalize_int n (ptr_t_ikind ()))
- | TPtr(ty, _), (S _ | WS _) ->
+ | (TArray(ty, _, _) | TPtr (ty, _)), (S _ | WS _) ->
v
| TEnum(_, _), I n ->
I (normalize_int n enum_ikind)
@@ -217,8 +217,6 @@ let binop env op tyop tyres ty1 v1 ty2 v2 =
comparison env (<=) None tyop v1 v2
| Oge ->
comparison env (>=) None tyop v1 v2
- | Ocomma ->
- v2
| Ologand ->
if boolean_value v1
then if boolean_value v2 then I 1L else I 0L
@@ -274,8 +272,102 @@ let constant_expr env ty e =
match unroll env ty, cast env ty (expr env e) with
| TInt(ik, _), I n -> Some(CInt(n, ik, ""))
| TPtr(_, _), I n -> Some(CInt(n, IInt, ""))
- | TPtr(_, _), S s -> Some(CStr s)
- | TPtr(_, _), WS s -> Some(CWStr s)
+ | (TArray(_, _, _) | TPtr(_, _)), S s -> Some(CStr s)
+ | (TArray(_, _, _) | TPtr(_, _)), WS s -> Some(CWStr s)
| TEnum(_, _), I n -> Some(CInt(n, enum_ikind, ""))
| _ -> None
with Notconst -> None
+
+(* Recognition of constant initializers and constant expressions.
+ This is just a check: no evaluation of the constants is done.
+ Reference: ISO C99 section 6.6 *)
+
+let rec is_constant_init env = function
+ | Init_single e -> is_constant_expr env e
+ | Init_array il -> List.for_all (is_constant_init env) il
+ | Init_struct(id, fil) ->
+ List.for_all (fun (f, i) -> is_constant_init env i) fil
+ | Init_union(id, f, i) -> is_constant_init env i
+
+and is_constant_expr env e =
+ match e.edesc with
+ | EConst cst -> true
+ | ESizeof ty -> true
+ | EAlignof ty -> true
+ | EVar id ->
+ begin match Env.find_ident env id with
+ | Env.II_ident _ -> is_constant_rval_of_lval env e
+ | Env.II_enum _ -> true (* an enum value is a constant *)
+ | exception Env.Error _ -> false (* should not happen *)
+ end
+ | EUnop(op, e1) ->
+ begin match op with
+ | Ominus | Oplus | Olognot | Onot -> is_constant_expr env e1
+ | Oderef | Odot _ | Oarrow _ -> is_constant_rval_of_lval env e
+ | Oaddrof -> is_constant_lval env e1
+ | Opreincr | Opredecr | Opostincr | Opostdecr -> false
+ (* Constant expressions shall not contain increment or decrement *)
+ end
+ | EBinop(op, e1, e2, _) ->
+ begin match op with
+ | Oadd | Osub | Omul | Odiv | Omod
+ | Oand | Oor | Oxor | Oshl | Oshr
+ | Oeq | One | Olt | Ogt | Ole | Oge
+ | Ologand | Ologor ->
+ is_constant_expr env e1 && is_constant_expr env e2
+ | Oindex ->
+ is_constant_rval_of_lval env e
+ | Oassign
+ | Oadd_assign | Osub_assign | Omul_assign | Odiv_assign | Omod_assign
+ | Oand_assign | Oor_assign | Oxor_assign | Oshl_assign | Oshr_assign ->
+ false
+ (* constant expressions shall not contain assignments *)
+ | Ocomma ->
+ false
+ (* some C compilers accept "e1, e2" as a constant expression.
+ But this is not standard ISO C. *)
+ end
+ | EConditional(e1, e2, e3) ->
+ is_constant_expr env e1 && is_constant_expr env e2
+ && is_constant_expr env e3
+ | ECast(ty, e1) ->
+ is_constant_expr env e1
+ | ECompound(ty, i) ->
+ is_constant_init env i
+ | ECall(fn, args) ->
+ false
+ (* constant expressions shall not contain function calls *)
+
+and is_constant_rval_of_lval env e =
+ (* The value of an object shall not be accessed by use of the . -> * []
+ operators. This is the case if the object has array or function type.
+ A scalar type or a composite type implies a memory access. *)
+ match unroll env e.etyp with
+ | TArray _ | TFun _ -> is_constant_lval env e
+ | _ -> false
+
+and is_constant_lval env e =
+ match e.edesc with
+ | EConst (CStr _)
+ | EConst (CWStr _) -> true
+ | EVar id ->
+ begin match Env.find_ident env id with
+ | Env.II_ident(sto, _) ->
+ begin match sto with
+ | Storage_default | Storage_extern | Storage_static -> true
+ | Storage_auto | Storage_register -> false
+ end
+ | Env.II_enum _ -> false (* should not happen *)
+ | exception Env.Error _ -> false (* should not happen *)
+ end
+ | EUnop(Oderef, e1) -> is_constant_expr env e1
+ | EUnop(Odot f, e1) -> is_constant_lval env e1
+ | EUnop(Oarrow f, e1) -> is_constant_expr env e1
+ | EBinop(Oindex, e1, e2, _) ->
+ is_constant_expr env e1 && is_constant_expr env e2
+ | ECompound(ty, i) ->
+ is_constant_init env i
+ | _ -> false
+
+
+
diff --git a/cparser/Ceval.mli b/cparser/Ceval.mli
index 7425a332..32a0ed91 100644
--- a/cparser/Ceval.mli
+++ b/cparser/Ceval.mli
@@ -16,3 +16,5 @@
val integer_expr : Env.t -> C.exp -> int64 option
val constant_expr : Env.t -> C.typ -> C.exp -> C.constant option
val normalize_int : int64 -> C.ikind -> int64
+val is_constant_init: Env.t -> C.init -> bool
+val is_constant_expr: Env.t -> C.exp -> bool
diff --git a/cparser/Cflow.ml b/cparser/Cflow.ml
index c7236ce8..cc257189 100644
--- a/cparser/Cflow.ml
+++ b/cparser/Cflow.ml
@@ -135,7 +135,7 @@ let catch_continue (s: flow) : flow = fun i ->
let o = s i in
{ o with onormal = o.onormal || o.ocontinue; ocontinue = false}
-(* Convert "continue" into "fallthrough". Typically applied to a loop. *)
+(* Convert "break" into "fallthrough". Typically applied to a loop. *)
let catch_break (s: flow) : flow = fun i ->
let o = s i in
diff --git a/cparser/Checks.ml b/cparser/Checks.ml
index ee36e226..62d85c1b 100644
--- a/cparser/Checks.ml
+++ b/cparser/Checks.ml
@@ -106,6 +106,7 @@ let unknown_attrs_program p =
let decl env loc d =
unknown_attrs_decl env loc d
and fundef env loc f =
+ List.iter (fun (id,typ) -> unknown_attrs_typ env loc typ) f.fd_params;
unknown_attrs loc f.fd_attrib;
unknown_attrs_stmt env f.fd_body;
List.iter (unknown_attrs_decl env loc) f.fd_locals;
diff --git a/cparser/Cleanup.ml b/cparser/Cleanup.ml
index fe674d9b..63ac8ac1 100644
--- a/cparser/Cleanup.ml
+++ b/cparser/Cleanup.ml
@@ -93,7 +93,7 @@ let rec add_stmt s =
| Scontinue -> ()
| Sswitch(e, s1) -> add_exp e; add_stmt s1
| Slabeled(lbl, s) ->
- begin match lbl with Scase e -> add_exp e | _ -> () end;
+ begin match lbl with Scase(e, _) -> add_exp e | _ -> () end;
add_stmt s
| Sgoto lbl -> ()
| Sreturn None -> ()
@@ -118,7 +118,12 @@ let add_enum e =
e
(* Saturate the set of referenced identifiers, starting with externally
- visible global declarations *)
+ visible global declarations.
+
+ Externally-visible globals include a minima:
+ - Definitions of functions, unless "static" or "inline".
+ - Declaration of variables with default storage.
+*)
let visible_decl (sto, id, ty, init) =
sto = Storage_default &&
@@ -129,7 +134,7 @@ let visible_fundef f =
| Storage_default -> not f.fd_inline
| Storage_extern -> true
| Storage_static -> false
- | Storage_register -> assert false
+ | Storage_auto | Storage_register -> assert false
let rec add_init_globdecls accu = function
| [] -> accu
diff --git a/cparser/Cprint.ml b/cparser/Cprint.ml
index d623ab96..9aeec421 100644
--- a/cparser/Cprint.ml
+++ b/cparser/Cprint.ml
@@ -361,6 +361,7 @@ let storage pp = function
| Storage_default -> ()
| Storage_extern -> fprintf pp "extern "
| Storage_static -> fprintf pp "static "
+ | Storage_auto -> () (* used only in blocks, where it can be omitted *)
| Storage_register -> fprintf pp "register "
let full_decl pp (sto, id, ty, int) =
@@ -477,7 +478,7 @@ let rec stmt pp s =
and slabel pp = function
| Slabel s ->
fprintf pp "%s" s
- | Scase e ->
+ | Scase(e, _) ->
fprintf pp "case %a" exp (0, e)
| Sdefault ->
fprintf pp "default"
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml
index f3cd5d14..ea9713d5 100644
--- a/cparser/Cutil.ml
+++ b/cparser/Cutil.ml
@@ -110,7 +110,8 @@ let declare_attributes l =
List.iter (fun (n,c) -> declare_attribute n c) l
let class_of_attribute = function
- | AConst | AVolatile | ARestrict | AAlignas _ -> Attr_type
+ | AConst | AVolatile | ARestrict -> Attr_type
+ | AAlignas _ -> Attr_name
| Attr(name, args) ->
try Hashtbl.find attr_class (normalize_attrname name)
with Not_found -> Attr_unknown
@@ -124,9 +125,8 @@ let attr_is_standard = function
(* Is an attribute applicable to a whole array (true) or only to
array elements (false)? *)
-let attr_array_applicable = function
- | AConst | AVolatile | ARestrict | AAlignas _ -> false
- | Attr _ -> true
+let attr_array_applicable a =
+ class_of_attribute a <> Attr_type
(* Is an attribute of a composite type applicable to members of this type
when they are accessed? *)
@@ -175,11 +175,20 @@ let rec attributes_of_type env t =
| TFun(ty, params, vararg, a) -> a
| TNamed(s, a) -> attributes_of_type env (unroll env t)
| TStruct(s, a) ->
- let ci = Env.find_struct env s in add_attributes ci.ci_attr a
+ begin match Env.find_struct env s with
+ | ci -> add_attributes ci.ci_attr a
+ | exception Env.Error(Env.Unbound_tag _) -> a
+ end
| TUnion(s, a) ->
- let ci = Env.find_union env s in add_attributes ci.ci_attr a
+ begin match Env.find_union env s with
+ | ci -> add_attributes ci.ci_attr a
+ | exception Env.Error(Env.Unbound_tag _) -> a
+ end
| TEnum(s, a) ->
- let ei = Env.find_enum env s in add_attributes ei.ei_attr a
+ begin match Env.find_enum env s with
+ | ei -> add_attributes ei.ei_attr a
+ | exception Env.Error(Env.Unbound_tag _) -> a
+ end
(* Changing the attributes of a type (at top-level) *)
(* Same hack as above for array types. *)
@@ -249,15 +258,33 @@ let strip_last_attribute typ =
| TEnum (n,at) -> let l,r = hd_opt at in
l,TEnum(n,r)
+(* Check whether the attributes contain _Alignas attribute *)
+let has_std_alignas env typ =
+ List.exists (function | AAlignas _ -> true | _ -> false) (attributes_of_type env typ)
+
(* Extracting alignment value from a set of attributes. Return 0 if none. *)
let alignas_attribute al =
let rec alignas_attr accu = function
| [] -> accu
| AAlignas n :: al -> alignas_attr (max n accu) al
+ | Attr(("aligned" | "__aligned__"), [AInt n]) :: al ->
+ alignas_attr (max (Int64.to_int n) accu) al
| a :: al -> alignas_attr accu al
in alignas_attr 0 al
+(* Extracting struct packing parameters from a set of attributes.
+ Assume the parameters were checked earlier, e.g. alignments are
+ either 0 or powers of two. *)
+
+let packing_parameters al =
+ match find_custom_attributes ["packed";"__packed__"] al with
+ | [[]] -> (1, 0, false)
+ | [[AInt n]] -> (Int64.to_int n, 0, false)
+ | [[AInt n; AInt p]] -> (Int64.to_int n, Int64.to_int p, false)
+ | [[AInt n; AInt p; AInt q]] -> (Int64.to_int n, Int64.to_int p, q = 1L)
+ | _ -> (0, 0, false)
+
(* Type compatibility *)
exception Incompat
@@ -452,7 +479,10 @@ let rec alignof env t =
let ci = Env.find_union env name in ci.ci_alignof
| TEnum(_, _) -> Some(alignof_ikind enum_ikind)
-(* Compute the natural alignment of a struct or union. *)
+(* Compute the natural alignment of a struct or union.
+ Not done here but in composite_info_decl: taking into account
+ the packing parameters (max-field-alignment, min-struct-alignment)
+ and the alignas attributes. *)
let alignof_struct_union env members =
let rec align_rec al = function
@@ -521,7 +551,7 @@ let rec sizeof env t =
(* Compute the size of a union.
It is the size is the max of the sizes of fields.
- Not done here but in composite_info_decl: rounding size to alignment. *)
+ Not done here but in composite_info_def: rounding size to alignment. *)
let sizeof_union env members =
let rec sizeof_rec sz = function
@@ -534,69 +564,66 @@ let sizeof_union env members =
end
in sizeof_rec 0 members
-(* Compute the size of a struct.
+(* Compute the size of a struct and the byte offset of the members.
We lay out fields consecutively, inserting padding to preserve
their alignment.
- Not done here but in composite_info_decl: rounding size to alignment. *)
-let sizeof_struct env members =
- let rec sizeof_rec ofs = function
+ The [ma] parameter is the maximal alignment for each member.
+ It is used for packed structs. If [ma = 0], it is ignored.
+ Bitfields are taken into account for the size and offset computations
+ but not given an offset.
+ Not done here but in composite_info_def: rounding size to alignment. *)
+let sizeof_layout_struct env members ma =
+ let align_offset ofs a =
+ align ofs (if ma > 0 && a > ma then ma else a) in
+ let rec sizeof_rec ofs accu = function
| [] ->
- Some ofs
+ Some (ofs, accu)
| [ { fld_typ = TArray(_, None, _) } as m ] ->
(* C99: ty[] allowed as last field *)
begin match alignof env m.fld_typ with
- | Some a -> Some (align ofs a)
+ | Some a ->
+ let ofs = align_offset ofs a in
+ Some (ofs, (m.fld_name, ofs) :: accu)
| None -> None
end
| m :: rem as ml ->
if m.fld_bitfield = None then begin
match alignof env m.fld_typ, sizeof env m.fld_typ with
- | Some a, Some s -> sizeof_rec (align ofs a + s) rem
+ | Some a, Some s ->
+ let ofs = align_offset ofs a in
+ sizeof_rec (ofs + s) ((m.fld_name, ofs) :: accu) rem
| _, _ -> None
end else begin
let (s, a, ml') = pack_bitfields ml in
- sizeof_rec (align ofs a + s) ml'
+ sizeof_rec (align_offset ofs a + s) accu ml'
end
- in sizeof_rec 0 members
+ in sizeof_rec 0 [] members
+
+let sizeof_struct env members ma =
+ match sizeof_layout_struct env members ma with
+ | None -> None
+ | Some(sz, offsets) -> Some sz
+
+(* Compute the offsets of all non-bitfield members of a struct. *)
+let struct_layout env attrs members =
+ let (ma, _, _) = packing_parameters attrs in
+ match sizeof_layout_struct env members ma with
+ | Some(sz, offsets) -> offsets
+ | None -> []
(* Compute the offset of a struct member *)
let offsetof env ty field =
- let rec sub acc name = function
- | [] -> List.rev acc
- | m::rem -> if m.fld_name = name then
- List.rev acc
- else
- sub (m::acc) name rem in
match unroll env ty with
- | TStruct (id,_) ->
+ | TStruct (id, _) ->
let str = Env.find_struct env id in
- let pre = sub [] field.fld_name str.ci_members in
- begin match sizeof_struct env pre, alignof env field.fld_typ with
- | Some s, Some a ->
- align s a
- | _ -> assert false end
- | TUnion _ -> 0
- | _ -> assert false
-
-(* Simplified version to compute offsets on structs without bitfields *)
-let struct_layout env members =
- let rec struct_layout_rec mem ofs = function
- | [] ->
- mem
- | [ { fld_typ = TArray(_, None, _) } as m ] ->
- (* C99: ty[] allowed as last field *)
- begin match alignof env m.fld_typ with
- | Some a -> ( m.fld_name,align ofs a)::mem
- | None -> []
+ let offsets = struct_layout env str.ci_attr str.ci_members in
+ begin try
+ List.assoc field.fld_name offsets
+ with Not_found ->
+ raise (Env.Error(No_member(id.C.name, "struct", field.fld_name)))
end
- | m :: rem ->
- match alignof env m.fld_typ, sizeof env m.fld_typ with
- | Some a, Some s ->
- let offset = align ofs a in
- struct_layout_rec ((m.fld_name,offset)::mem) (offset + s) rem
- | _, _ -> []
- in struct_layout_rec [] 0 members
-
+ | TUnion _ -> 0
+ | _ -> assert false
(* Determine whether a type is incomplete *)
@@ -616,12 +643,35 @@ let composite_info_decl su attr =
ci_attr = attr }
let composite_info_def env su attr m =
+ let (max_field_align, min_struct_align, swapped) = packing_parameters attr in
+ let attr_align = alignas_attribute attr in
+ let natural_align = alignof_struct_union env m in
let al =
- let a = alignas_attribute attr in
- if a > 0 then Some a else alignof_struct_union env m
- and sz =
+ (* alignas takes precedence over packing *)
+ if attr_align > 0 then Some attr_align
+ (* ignore packing on unions for compatibility with earlier versions *)
+ else if su = Union then natural_align
+ else begin
+ match natural_align with
+ | None -> None
+ | Some a ->
+ (* If max_field_align is given, reduce natural alignment a
+ to be at most max_field_align *)
+ let a =
+ if max_field_align > 0 && a > max_field_align
+ then max_field_align
+ else a in
+ (* If min_struct_align is given, increase alignment a
+ to be at least min_struct_align *)
+ let a =
+ if min_struct_align > 0 && a < min_struct_align
+ then min_struct_align
+ else a in
+ Some a
+ end in
+ let sz =
match su with
- | Struct -> sizeof_struct env m
+ | Struct -> sizeof_struct env m max_field_align
| Union -> sizeof_union env m
in
{ ci_kind = su; ci_members = m;
@@ -749,6 +799,11 @@ let is_anonymous_composite = function
| TUnion (id,_) -> id.C.name = ""
| _ -> false
+let is_function_pointer_type env t =
+ match unroll env t with
+ | TPtr (ty, _) -> is_function_type env ty
+ | _ -> false
+
(* Find the info for a field access *)
let field_of_dot_access env t m =
@@ -780,6 +835,15 @@ let float_rank = function
| FDouble -> 2
| FLongDouble -> 3
+(* Test for qualified array types *)
+
+let rec is_qualified_array = function
+ | TArray (ty, _, attr) ->
+ List.exists attr_is_standard attr || is_qualified_array ty
+ | TPtr (ty, _) -> is_qualified_array ty
+ | TFun(ty_ret, _, _, _) -> is_qualified_array ty_ret
+ | _ -> false
+
(* Array and function types "decay" to pointer types in many cases *)
let pointer_decay env t =
@@ -857,7 +921,7 @@ let argument_conversion env t =
(* Arrays and functions degrade automatically to pointers *)
(* Other types are not changed *)
match unroll env t with
- | TArray(ty, _, _) -> TPtr(ty, [])
+ | TArray(ty, _, attr) -> TPtr(ty, attr)
| TFun _ as ty -> TPtr(ty, [])
| _ -> t (* preserve typedefs *)
@@ -923,8 +987,12 @@ let ptrdiff_t_ikind () = find_matching_signed_ikind !config.sizeof_ptrdiff_t
let type_of_constant = function
| CInt(_, ik, _) -> TInt(ik, [])
| CFloat(_, fk) -> TFloat(fk, [])
- | CStr _ -> TPtr(TInt(IChar, []), [])
- | CWStr _ -> TPtr(TInt(wchar_ikind(), []), [])
+ | CStr s ->
+ let size = Int64.of_int (String.length s + 1) in
+ TArray(TInt(IChar,[]), Some size, [])
+ | CWStr s ->
+ let size = Int64.of_int (List.length s + 1) in
+ TArray(TInt(wchar_ikind(), []), Some size, [])
| CEnum(_, _) -> TInt(IInt, [])
(* Check that a C expression is a lvalue *)
@@ -932,6 +1000,8 @@ let type_of_constant = function
let rec is_lvalue e =
match e.edesc with
| EVar id -> true
+ | EConst (CStr _)
+ | EConst (CWStr _) -> true
| EUnop((Oderef | Oarrow _), _) -> true
| EUnop(Odot _, e') -> is_lvalue e'
| EBinop(Oindex, _, _, _) -> true
@@ -998,6 +1068,17 @@ let is_bitfield env e =
fld.fld_bitfield <> None
| _ -> false
+let contains_flex_array_mem env ty =
+ match unroll env ty with
+ | TStruct (id,_) ->
+ let ci = Env.find_struct env id in
+ let rec check_mem = function
+ | [] -> false
+ | [ { fld_typ = TArray(ty_elt, None, _) } ] -> true
+ | _::rem -> check_mem rem in
+ check_mem ci.ci_members
+ | _ -> false
+
(* Assignment compatibility check over attributes.
Standard attributes ("const", "volatile", "restrict") can safely
be added (to the rhs type to get the lhs type) but must not be dropped.
diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli
index fb875b0d..dc9dc0cc 100644
--- a/cparser/Cutil.mli
+++ b/cparser/Cutil.mli
@@ -34,8 +34,14 @@ val remove_attributes : attributes -> attributes -> attributes
val incl_attributes : attributes -> attributes -> bool
(* Check that first set of attributes is a subset of second set. *)
val alignas_attribute : attributes -> int
- (* Extract the value of the [_Alignas] attributes, if any.
+ (* Extract the value of the [_Alignas] and [attribute((aligned(N)))]
+ attributes, if any.
Return 0 if none, a (positive) power of two alignment if some. *)
+val packing_parameters : attributes -> int * int * bool
+ (* Extract the value of the [__packed__] attributes, if any.
+ Return a triple
+ (maximum field alignment, minimum struct alignment, byte swapping).
+ Alignments of 0 mean default alignment. *)
val find_custom_attributes : string list -> attributes -> attr_arg list list
(* Extract arguments of custom [Attr] attributes whose names appear
in the given list of names. *)
@@ -52,6 +58,8 @@ val erase_attributes_type : Env.t -> typ -> typ
(* Erase the attributes of the given type. *)
val change_attributes_type : Env.t -> (attributes -> attributes) -> typ -> typ
(* Apply the given function to the top-level attributes of the given type *)
+val has_std_alignas : Env.t -> typ -> bool
+ (* Do the attributes of the type contain the C11 _Alignas attribute *)
type attribute_class =
| Attr_name (* Attribute applies to the names being declared *)
@@ -127,7 +135,7 @@ val composite_info_decl:
val composite_info_def:
Env.t -> struct_or_union -> attributes -> field list -> Env.composite_info
val struct_layout:
- Env.t -> field list -> (string * int) list
+ Env.t -> attributes -> field list -> (string * int) list
val offsetof:
Env.t -> typ -> field -> int
(* Compute the offset of a struct member *)
@@ -153,8 +161,12 @@ val is_composite_type : Env.t -> typ -> bool
(* Is type a struct or union? *)
val is_function_type : Env.t -> typ -> bool
(* Is type a function type? (not pointer to function) *)
+val is_function_pointer_type : Env.t -> typ -> bool
+ (* Is type a pointer to function type? *)
val is_anonymous_composite : typ -> bool
- (* Is type an anonymous composite? *)
+ (* Is type an anonymous composite? *)
+val is_qualified_array : typ -> bool
+ (* Does the type contain a qualified array type (e.g. int[const 5])? *)
val pointer_arithmetic_ok : Env.t -> typ -> bool
(* Is the type [*ty] appropriate for pointer arithmetic?
[ty] must not be void, nor a function type, nor an incomplete type. *)
@@ -245,6 +257,8 @@ val is_volatile_variable: Env.t -> exp -> bool
(* Test whether the expression is an access to a volatile variable *)
val is_bitfield: Env.t -> exp -> bool
(* Test whether the expression is a bit-field *)
+val contains_flex_array_mem : Env.t -> typ -> bool
+ (* Is this a struct with a flexible array member *)
(* Constructors *)
diff --git a/cparser/Diagnostics.ml b/cparser/Diagnostics.ml
index f18d1b2d..172affab 100644
--- a/cparser/Diagnostics.ml
+++ b/cparser/Diagnostics.ml
@@ -92,12 +92,17 @@ type warning_type =
| Unused_parameter
| Wrong_ais_parameter
| Unused_ais_parameter
+ | Ignored_attributes
+ | Extern_after_definition
+ | Static_in_inline
+ | Flexible_array_extensions
+ | Tentative_incomplete_static
+ | Reduced_alignment
(* List of active warnings *)
let active_warnings: warning_type list ref = ref [
Unnamed;
Unknown_attribute;
- Celeven_extension;
Gnu_empty_struct;
Missing_declarations;
Constant_conversion;
@@ -114,6 +119,9 @@ let active_warnings: warning_type list ref = ref [
Inline_asm_sdump;
Wrong_ais_parameter;
Unused_ais_parameter;
+ Ignored_attributes;
+ Extern_after_definition;
+ Static_in_inline;
]
(* List of errors treated as warning *)
@@ -145,6 +153,12 @@ let string_of_warning = function
| Unused_parameter -> "unused-parameter"
| Wrong_ais_parameter -> "wrong-ais-parameter"
| Unused_ais_parameter -> "unused-ais-parameter"
+ | Ignored_attributes -> "ignored-attributes"
+ | Extern_after_definition -> "extern-after-definition"
+ | Static_in_inline -> "static-in-inline"
+ | Flexible_array_extensions -> "flexible-array-extensions"
+ | Tentative_incomplete_static -> "tentative-incomplete-static"
+ | Reduced_alignment -> "reduced-alignment"
(* Activate the given warning *)
let activate_warning w () =
@@ -192,6 +206,12 @@ let wall () =
Unused_variable;
Unused_parameter;
Wrong_ais_parameter;
+ Ignored_attributes;
+ Extern_after_definition;
+ Static_in_inline;
+ Flexible_array_extensions;
+ Tentative_incomplete_static;
+ Reduced_alignment;
]
let wnothing () =
@@ -223,6 +243,12 @@ let werror () =
Unused_variable;
Wrong_ais_parameter;
Unused_ais_parameter;
+ Ignored_attributes;
+ Extern_after_definition;
+ Static_in_inline;
+ Flexible_array_extensions;
+ Tentative_incomplete_static;
+ Reduced_alignment;
]
(* Generate the warning key for the message *)
@@ -401,6 +427,12 @@ let warning_options =
error_option Unused_parameter @
error_option Wrong_ais_parameter @
error_option Unused_ais_parameter @
+ error_option Ignored_attributes @
+ error_option Extern_after_definition @
+ error_option Static_in_inline @
+ error_option Flexible_array_extensions @
+ error_option Tentative_incomplete_static @
+ error_option Reduced_alignment @
[Exact ("-Wfatal-errors"), Set error_fatal;
Exact ("-fdiagnostics-color"), Ignore; (* Either output supports it or no color *)
Exact ("-fno-diagnostics-color"), Unset color_diagnostics;
diff --git a/cparser/Diagnostics.mli b/cparser/Diagnostics.mli
index 75865cb2..ded8019f 100644
--- a/cparser/Diagnostics.mli
+++ b/cparser/Diagnostics.mli
@@ -49,6 +49,12 @@ type warning_type =
| Unused_parameter (** unused function parameter *)
| Wrong_ais_parameter (** wrong parameter type for ais replacement *)
| Unused_ais_parameter (** unused builtin ais parameter *)
+ | Ignored_attributes (** attributes declarations after definition *)
+ | Extern_after_definition (** extern declaration after non-extern definition *)
+ | Static_in_inline (** static variable in non-static inline function *)
+ | Flexible_array_extensions (** usange of structs with flexible arrays in structs and arrays *)
+ | Tentative_incomplete_static (** static tentative definition with incomplete type *)
+ | Reduced_alignment (** alignment reduction *)
val warning : (string * int) -> warning_type -> ('a, Format.formatter, unit, unit, unit, unit) format6 -> 'a
(** [warning (f,c) w fmt arg1 ... argN] formats the arguments [arg1] to [argN] as warining according to
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index a1f85886..718261b4 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -69,6 +69,20 @@ let top_declarations = ref ([] : globdecl list)
let top_environment = ref Env.empty
+(* Set of all globals with a definitions *)
+
+module StringSet = Set.Make(String)
+
+let global_defines = ref StringSet.empty
+
+let add_global_define loc name =
+ if StringSet.mem name !global_defines then
+ error loc "redefinition of '%s'" name;
+ global_defines := StringSet.add name !global_defines
+
+let is_global_defined name =
+ StringSet.mem name !global_defines
+
let emit_elab ?(debuginfo = true) ?(linkage = false) env loc td =
let loc = elab_loc loc in
let dec ={ gdesc = td; gloc = loc } in
@@ -84,7 +98,7 @@ let emit_elab ?(debuginfo = true) ?(linkage = false) env loc td =
| _ -> ()
end
-let reset() = top_declarations := []; top_environment := Env.empty
+let reset() = top_declarations := []; top_environment := Env.empty; global_defines := StringSet.empty
let elaborated_program () =
let p = !top_declarations in
@@ -101,6 +115,15 @@ let rec mmap f env = function
let (tl', env2) = mmap f env1 tl in
(hd' :: tl', env2)
+let rec mmap2 f env l1 l2 =
+ match l1,l2 with
+ | [],[] -> [],env
+ | a1::l1,a2::l2 ->
+ let hd,env1 = f env a1 a2 in
+ let tl,env2 = mmap2 f env1 l1 l2 in
+ (hd::tl,env2)
+ | _, _ -> invalid_arg "mmap2"
+
(* To detect redefinitions within the same scope *)
let previous_def fn env arg =
@@ -116,6 +139,13 @@ let redef fn env arg =
(* Auxiliaries for handling declarations and redeclarations *)
+let name_of_storage_class = function
+ | Storage_default -> "<default>"
+ | Storage_extern -> "'extern'"
+ | Storage_static -> "'static'"
+ | Storage_auto -> "'auto'"
+ | Storage_register -> "'register'"
+
let combine_toplevel_definitions loc env s old_sto old_ty sto ty =
let new_ty =
match combine_types AttrCompat env old_ty ty with
@@ -126,26 +156,43 @@ let combine_toplevel_definitions loc env s old_sto old_ty sto ty =
"redefinition of '%s' with a different type: %a vs %a"
s (print_typ env) old_ty (print_typ env) ty;
ty in
+ if is_global_defined s then begin
+ let old_attrs = attributes_of_type env old_ty
+ and new_attrs = attributes_of_type env ty in
+ if not (Cutil.incl_attributes new_attrs old_attrs) then
+ warning loc Ignored_attributes "attribute declaration must precede definition"
+ end;
let new_sto =
(* The only case not allowed is removing static *)
match old_sto,sto with
| Storage_static,Storage_static
| Storage_extern,Storage_extern
- | Storage_register,Storage_register
| Storage_default,Storage_default -> sto
| _,Storage_static ->
error loc "static declaration of '%s' follows non-static declaration" s;
sto
| Storage_static,_ -> Storage_static (* Static stays static *)
| Storage_extern,_ -> sto
- | Storage_default,Storage_extern -> Storage_extern
+ | Storage_default,Storage_extern ->
+ if is_global_defined s && is_function_type env ty then
+ warning loc Extern_after_definition "this extern declaration follows a non-extern definition and is ignored";
+ Storage_extern
| _,Storage_extern -> old_sto
+ (* "auto" and "register" don't appear in toplevel definitions.
+ Normally this was checked earlier. Generate error message
+ instead of "assert false", just in case. *)
+ | _,Storage_auto
+ | Storage_auto,_
| _,Storage_register
- | Storage_register,_ -> Storage_register
+ | Storage_register,_ ->
+ error loc "unexpected %s declaration of '%s'"
+ (name_of_storage_class sto) s;
+ sto
in
(new_sto, new_ty)
-let enter_or_refine_ident local loc env s sto ty =
+let enter_or_refine_ident_base local loc env new_id sto ty =
+ let s = new_id.C.name in
(* Check for illegal redefinitions:
- a name that was previously a typedef
- a variable that was already declared in the same local scope
@@ -155,41 +202,67 @@ let enter_or_refine_ident local loc env s sto ty =
if redef Env.lookup_typedef env s then
error loc "redefinition of '%s' as different kind of symbol" s;
begin match previous_def Env.lookup_ident env s with
- | Some(id, Env.II_ident(old_sto, old_ty))
- when local && Env.in_current_scope env id
+ | Some(old_id, Env.II_ident(old_sto, old_ty))
+ when local && Env.in_current_scope env old_id
&& not (sto = Storage_extern && old_sto = Storage_extern) ->
error loc "redefinition of '%s'" s
- | Some(id, Env.II_enum _) when Env.in_current_scope env id ->
+ | Some(old_id, Env.II_enum _) when Env.in_current_scope env old_id ->
error loc "redefinition of '%s' as different kind of symbol" s;
| _ ->
()
end;
- (* For a block-scoped, non-"extern" variable, a new declaration
- is entered, and it has no linkage. *)
- if local && sto <> Storage_extern then begin
- let (id, env') = Env.enter_ident env s sto ty in
- (id, sto, env', ty, false)
+ (* For a block-scoped, "static" or "auto" or "register" variable,
+ a new declaration is entered, and it has no linkage. *)
+ if local
+ && (sto = Storage_auto || sto = Storage_register || sto = Storage_static)
+ then begin
+ (new_id, sto, Env.add_ident env new_id sto ty, ty, false)
end else begin
(* For a file-scoped or "extern" variable, we need to check against
prior declarations of this variable with internal or external linkage.
The variable has linkage. *)
match previous_def Env.lookup_ident !top_environment s with
- | Some(id, Env.II_ident(old_sto, old_ty)) ->
+ | Some(old_id, Env.II_ident(old_sto, old_ty)) ->
let (new_sto, new_ty) =
combine_toplevel_definitions loc env s old_sto old_ty sto ty in
- (id, new_sto, Env.add_ident env id new_sto new_ty, new_ty, true)
+ (old_id, new_sto, Env.add_ident env old_id new_sto new_ty, new_ty, true)
| _ ->
- let (id, env') = Env.enter_ident env s sto ty in
- (id, sto, env', ty, true)
+ (new_id, sto, Env.add_ident env new_id sto ty, ty, true)
end
+(* We use two variants of [enter_or_refine]:
+
+ - [enter_or_refine_ident] is to be used for all declarations,
+ block-scoped ([local = true]) or top-level ([local = false]).
+ The name of the declared thing is given as a string [s]. If a
+ previous declaration with this name exists in the current scope,
+ its unique identifier is returned. Otherwise a fresh identifier
+ named [s] is created in the current scope of [env] and returned.
+
+ - [enter_or_refine_function] is to be used for function definitions.
+ Such definitions are always global, hence the [local] parameter
+ defaults to [false] and is omitted. The function name is given
+ as an identifier, created in advance by the caller. This
+ identifier is used if no previous declaration exists for the
+ function. Otherwise, the identifier of the previous declaration is
+ used. By creating the identifier in advance, [elab_fundef] makes
+ sure that it is properly scoped to file scope and not to the local
+ scope of function parameters.
+*)
+
+let enter_or_refine_ident local loc env s sto ty =
+ enter_or_refine_ident_base local loc env (Env.fresh_ident s) sto ty
+
+let enter_or_refine_function loc env id sto ty =
+ enter_or_refine_ident_base false loc env id sto ty
+
(* Forward declarations *)
let elab_expr_f : (cabsloc -> Env.t -> Cabs.expression -> C.exp * Env.t) ref
= ref (fun _ _ _ -> assert false)
-let elab_funbody_f : (C.typ -> bool -> Env.t -> statement -> C.stmt) ref
- = ref (fun _ _ _ _ -> assert false)
+let elab_funbody_f : (C.typ -> bool -> bool -> Env.t -> statement -> C.stmt) ref
+ = ref (fun _ _ _ _ _ -> assert false)
(** * Elaboration of constants - C99 section 6.4.4 *)
@@ -422,35 +495,53 @@ let elab_gcc_attr loc env = function
let is_power_of_two n = n > 0L && Int64.logand n (Int64.pred n) = 0L
-let extract_alignas loc a =
+(* Check alignment parameter *)
+let check_alignment loc n =
+ if not (is_power_of_two n || n = 0L) then begin
+ error loc "requested alignment %Ld is not a power of 2" n; false
+ end else
+ if n <> Int64.of_int (Int64.to_int n) then begin
+ error loc "requested alignment %Ld is too large" n; false
+ end else
+ true
+
+(* Process GCC attributes that have special significance. Currently we
+ have two: "aligned" and "packed". *)
+let enter_gcc_attr loc a =
match a with
| Attr(("aligned"|"__aligned__"), args) ->
begin match args with
- | [AInt n] when is_power_of_two n -> AAlignas (Int64.to_int n)
- | [AInt n] -> error loc "requested alignment is not a power of 2"; a
- | [_] -> error loc "requested alignment is not an integer constant"; a
- | [] -> a (* Use the default alignment as the gcc does *)
- | _ -> error loc "'aligned' attribute takes no more than 1 argument"; a
+ | [AInt n] -> if check_alignment loc n then [a] else []
+ | [_] -> error loc "requested alignment is not an integer constant"; []
+ | [] -> [] (* Use default alignment, like gcc does *)
+ | _ -> error loc "'aligned' attribute takes no more than 1 argument"; []
+ end
+ | Attr(("packed"|"__packed__"), args) ->
+ begin match args with
+ | [] -> [a]
+ | [AInt n] -> if check_alignment loc n then [a] else []
+ | [AInt n; AInt p] ->
+ if check_alignment loc n && check_alignment loc p then [a] else []
+ | [AInt n; AInt p; AInt q] when q = 0L || q = 1L ->
+ if check_alignment loc n && check_alignment loc p then [a] else []
+ | _ -> error loc "ill-formed 'packed' attribute"; []
end
- | _ -> a
+ | _ -> [a]
let elab_attribute env = function
| GCC_ATTR (l, loc) ->
List.fold_left add_attributes []
- (List.map (fun attr -> [attr])
- (List.map (extract_alignas loc)
- (List.flatten
- (List.map (elab_gcc_attr loc env) l))))
+ (List.map (enter_gcc_attr loc)
+ (List.flatten
+ (List.map (elab_gcc_attr loc env) l)))
| PACKED_ATTR (args, loc) ->
- [Attr("__packed__", List.map (elab_attr_arg loc env) args)]
+ enter_gcc_attr loc
+ (Attr("__packed__", List.map (elab_attr_arg loc env) args))
| ALIGNAS_ATTR ([a], loc) ->
+ warning loc Celeven_extension "'_Alignas' is a C11 extension";
begin match elab_attr_arg loc env a with
| AInt n ->
- if is_power_of_two n then
- [AAlignas (Int64.to_int n)]
- else begin
- error loc "requested alignment is not a power of 2"; []
- end
+ if check_alignment loc n then [AAlignas (Int64.to_int n)] else []
| _ -> error loc "requested alignment is not an integer constant"; []
| exception Wrong_attr_arg -> error loc "bad _Alignas value"; []
end
@@ -460,6 +551,22 @@ let elab_attribute env = function
let elab_attributes env al =
List.fold_left add_attributes [] (List.map (elab_attribute env) al)
+(* Warning for alignment requests that reduce the alignment below the
+ natural alignment. *)
+
+let warn_if_reduced_alignment loc ~actual ~natural =
+ match actual, natural with
+ | Some act, Some nat when act < nat ->
+ warning loc Reduced_alignment
+ "requested alignment (%d) is less than natural alignment (%d)"
+ act nat
+ | _, _ -> ()
+
+let check_reduced_alignment loc env typ =
+ warn_if_reduced_alignment loc
+ ~actual: (wrap alignof loc env typ)
+ ~natural: (wrap alignof loc env (erase_attributes_type env typ))
+
(* Auxiliary for typespec elaboration *)
let typespec_rank = function (* Don't change this *)
@@ -491,14 +598,15 @@ let get_nontype_attrs env ty =
let nta = List.filter to_be_removed (attributes_of_type env ty) in
(remove_attributes_type env nta ty, nta)
-(* Elaboration of a type specifier. Returns 5-tuple:
- (storage class, "inline" flag, "typedef" flag, elaborated type, new env)
+(* Elaboration of a type specifier. Returns 6-tuple:
+ (storage class, "inline" flag, "noreturn" flag, "typedef" flag,
+ elaborated type, new env)
Optional argument "only" is true if this is a standalone
struct or union declaration, without variable names.
C99 section 6.7.2.
*)
-let rec elab_specifier keep_ty ?(only = false) loc env specifier =
+let rec elab_specifier ?(only = false) loc env specifier =
(* We first divide the parts of the specifier as follows:
- a storage class
- a set of attributes (const, volatile, restrict)
@@ -506,18 +614,20 @@ let rec elab_specifier keep_ty ?(only = false) loc env specifier =
let sto = ref Storage_default
and inline = ref false
and noreturn = ref false
+ and restrict = ref false
and attr = ref []
and tyspecs = ref []
and typedef = ref false in
let do_specifier = function
| SpecCV cv ->
+ restrict := cv = CV_RESTRICT;
attr := add_attributes (elab_cvspec env cv) !attr
| SpecStorage st ->
if !sto <> Storage_default && st <> TYPEDEF then
- error loc "multiple storage-classes in declaration specifier";
+ error loc "multiple storage classes in declaration specifier";
begin match st with
- | AUTO -> ()
+ | AUTO -> sto := Storage_auto
| STATIC -> sto := Storage_static
| EXTERN -> sto := Storage_extern
| REGISTER -> sto := Storage_register
@@ -530,9 +640,18 @@ let rec elab_specifier keep_ty ?(only = false) loc env specifier =
| SpecFunction NORETURN -> noreturn := true
| SpecType tys -> tyspecs := tys :: !tyspecs in
+ let restrict_check ty =
+ if !restrict then
+ if not (is_pointer_type env ty) then
+ error loc "restrict requires a pointer type (%a is invalid)" (print_typ env) ty
+ else if is_function_pointer_type env ty then
+ error loc "pointer to function type %a may not be 'restrict' qualified" (print_typ env) ty in
+
List.iter do_specifier specifier;
- let simple ty = (!sto, !inline, !noreturn ,!typedef, add_attributes_type !attr ty, env) in
+ let simple ty =
+ restrict_check ty;
+ (!sto, !inline, !noreturn ,!typedef, add_attributes_type !attr ty, env) in
(* As done in CIL, partition !attr into struct-related attributes,
which are returned, and other attributes, which are left in !attr.
@@ -603,22 +722,28 @@ let rec elab_specifier keep_ty ?(only = false) loc env specifier =
let a' =
add_attributes (get_struct_attrs()) (elab_attributes env a) in
let (id', env') =
- elab_struct_or_union keep_ty only Struct loc id optmembers a' env in
- (!sto, !inline, !noreturn, !typedef, TStruct(id', !attr), env')
+ elab_struct_or_union only Struct loc id optmembers a' env in
+ let ty = TStruct(id', !attr) in
+ restrict_check ty;
+ (!sto, !inline, !noreturn, !typedef, ty, env')
| [Cabs.Tstruct_union(UNION, id, optmembers, a)] ->
let a' =
add_attributes (get_struct_attrs()) (elab_attributes env a) in
let (id', env') =
- elab_struct_or_union keep_ty only Union loc id optmembers a' env in
- (!sto, !inline, !noreturn, !typedef, TUnion(id', !attr), env')
+ elab_struct_or_union only Union loc id optmembers a' env in
+ let ty = TUnion(id', !attr) in
+ restrict_check ty;
+ (!sto, !inline, !noreturn, !typedef, ty, env')
| [Cabs.Tenum(id, optmembers, a)] ->
let a' =
add_attributes (get_struct_attrs()) (elab_attributes env a) in
let (id', env') =
elab_enum only loc id optmembers a' env in
- (!sto, !inline, !noreturn, !typedef, TEnum(id', !attr), env')
+ let ty = TEnum (id', !attr) in
+ restrict_check ty;
+ (!sto, !inline, !noreturn, !typedef, ty, env')
(* Specifier doesn't make sense *)
| _ ->
@@ -644,12 +769,23 @@ and elab_return_type loc env ty =
error loc "function cannot return function type %a" (print_typ env) ty
| _ -> ()
-and elab_type_declarator keep_ty loc env ty kr_ok = function
+(* The [?fundef] parameter is true if we're elaborating a function definition
+ and false otherwise. When [fundef = true], K&R function declarators
+ are allowed, and the returned environment includes bindings for the
+ function parameters and the struct/unions they may define.
+ When [fundef = false], K&R function declarators are rejected
+ and declarations in parameters are not returned. *)
+
+and elab_type_declarator ?(fundef = false) loc env ty = function
| Cabs.JUSTBASE ->
((ty, None), env)
| Cabs.ARRAY(d, cv_specs, sz) ->
let (ty, a) = get_nontype_attrs env ty in
let a = add_attributes a (elab_cvspecs env cv_specs) in
+ if wrap incomplete_type loc env ty then
+ error loc "array type has incomplete element type %a" (print_typ env) ty;
+ if wrap contains_flex_array_mem loc env ty then
+ warning loc Flexible_array_extensions "%a may not be used as an array element due to flexible array member" (print_typ env) ty;
let sz' =
match sz with
| None ->
@@ -666,33 +802,45 @@ and elab_type_declarator keep_ty loc env ty kr_ok = function
| None ->
error loc "size of array is not a compile-time constant";
Some 1L in (* produces better error messages later *)
- elab_type_declarator keep_ty loc env (TArray(ty, sz', a)) kr_ok d
+ elab_type_declarator ~fundef loc env (TArray(ty, sz', a)) d
| Cabs.PTR(cv_specs, d) ->
let (ty, a) = get_nontype_attrs env ty in
let a = add_attributes a (elab_cvspecs env cv_specs) in
- elab_type_declarator keep_ty loc env (TPtr(ty, a)) kr_ok d
+ if is_function_type env ty && incl_attributes [ARestrict] a then
+ error loc "pointer to function type %a may not be 'restrict' qualified" (print_typ env) ty;
+ elab_type_declarator ~fundef loc env (TPtr(ty, a)) d
| Cabs.PROTO(d, (params, vararg)) ->
elab_return_type loc env ty;
let (ty, a) = get_nontype_attrs env ty in
- let params',env' = elab_parameters keep_ty env params in
- let env = if keep_ty then Env.add_types env env' else env in
- elab_type_declarator keep_ty loc env (TFun(ty, Some params', vararg, a)) kr_ok d
+ let (params', env') = elab_parameters env params in
+ (* For a function declaration (fundef = false), the scope introduced
+ to treat parameters ends here, so we discard the extended
+ environment env' returned by elab_parameters.
+ For a function definition (fundef = true) we return the
+ extended environment env' so that it can serve as the basis
+ to elaborating the function body. *)
+ let env'' = if fundef then env' else env in
+ elab_type_declarator ~fundef loc env'' (TFun(ty, Some params', vararg, a)) d
| Cabs.PROTO_OLD(d, params) ->
elab_return_type loc env ty;
let (ty, a) = get_nontype_attrs env ty in
+ (* For consistency with the PROTO case above, for a function definition
+ (fundef = true) we open a new scope, even though we do not
+ add any bindings for the parameters. *)
+ let env'' = if fundef then Env.new_scope env else env in
match params with
| [] ->
- elab_type_declarator keep_ty loc env (TFun(ty, None, false, a)) kr_ok d
+ elab_type_declarator ~fundef loc env'' (TFun(ty, None, false, a)) d
| _ ->
- if not kr_ok || d <> Cabs.JUSTBASE then
+ if not fundef || d <> Cabs.JUSTBASE then
fatal_error loc "illegal old-style K&R function definition";
- ((TFun(ty, None, false, a), Some params), env)
+ ((TFun(ty, None, false, a), Some params), env'')
(* Elaboration of parameters in a prototype *)
-and elab_parameters keep_ty env params =
+and elab_parameters env params =
(* Prototype introduces a new scope *)
- let (vars, env) = mmap (elab_parameter keep_ty) (Env.new_scope env) params in
+ let (vars, env) = mmap elab_parameter (Env.new_scope env) params in
(* Catch special case f(t) where t is void or a typedef to void *)
match vars with
| [ ( {C.name=""}, t) ] when is_void_type env t -> [],env
@@ -700,42 +848,62 @@ and elab_parameters keep_ty env params =
(* Elaboration of a function parameter *)
-and elab_parameter keep_ty env (PARAM (spec, id, decl, attr, loc)) =
- let (sto, inl, noret, tydef, bty, env1) = elab_specifier keep_ty loc env spec in
+and elab_parameter env (PARAM (spec, id, decl, attr, loc)) =
+ let (sto, inl, noret, tydef, bty, env1) = elab_specifier loc env spec in
if tydef then
error loc "'typedef' used in function parameter";
- let ((ty, _), _) = elab_type_declarator keep_ty loc env1 bty false decl in
+ let ((ty, _), _) = elab_type_declarator loc env1 bty decl in
let ty = add_attributes_type (elab_attributes env attr) ty in
if sto <> Storage_default && sto <> Storage_register then
- error loc
- "invalid storage-class specifier in function declarator";
+ error loc (* NB: 'auto' not allowed *)
+ "invalid storage class %s for function parameter"
+ (name_of_storage_class sto);
if inl then
error loc "'inline' can only appear on functions";
if noret then
error loc "'_Noreturn' can only appear on functions";
let id = match id with None -> "" | Some id -> id in
+ if id <> "" && is_void_type env1 ty then
+ error loc "argument '%s' may not have 'void' type" id;
if id <> "" && redef Env.lookup_ident env id then
error loc "redefinition of parameter '%s'" id;
(* replace array and function types by pointer types *)
let ty1 = argument_conversion env1 ty in
+ if is_qualified_array ty1 then
+ error loc "type qualifier used in non-outermost array type derivation";
+ if has_std_alignas env ty then begin
+ if id <> "" then
+ error loc "alignment specified for parameter '%s'" id
+ else
+ error loc "alignment specified for unnamed parameter"
+ end;
let (id', env2) = Env.enter_ident env1 id sto ty1 in
( (id', ty1) , env2)
-(* Elaboration of a (specifier, Cabs "name") pair *)
-
-and elab_fundef_name keep_ty env spec (Name (id, decl, attr, loc)) =
- let (sto, inl, noret, tydef, bty, env') = elab_specifier keep_ty loc env spec in
+(* Elaboration of a (specifier, Cabs "name") pair as found in a function
+ definition. Returns two environments: the first is [env]
+ enriched with struct/union definitions from the return type,
+ as usual; the second is like the first, plus a new scope.
+ For a prototyped function ([kr_params = None]) the new scope
+ includes bindings for the function parameters and the struct/unions
+ they may define. For a K&R function ([kr_params <> None]) the new
+ scope is empty. *)
+
+and elab_fundef_name env spec (Name (s, decl, attr, loc)) =
+ let (sto, inl, noret, tydef, bty, env') = elab_specifier loc env spec in
if tydef then
error loc "'typedef' is forbidden here";
- let ((ty, kr_params), env'') = elab_type_declarator keep_ty loc env' bty true decl in
+ let id = Env.fresh_ident s in
+ let ((ty, kr_params), env'') =
+ elab_type_declarator ~fundef:true loc env' bty decl in
let a = elab_attributes env attr in
- (id, sto, inl, noret, add_attributes_type a ty, kr_params, env'')
+ (id, sto, inl, noret, add_attributes_type a ty, kr_params, env', env'')
(* Elaboration of a name group. C99 section 6.7.6 *)
-and elab_name_group keep_ty loc env (spec, namelist) =
+and elab_name_group loc env (spec, namelist) =
let (sto, inl, noret, tydef, bty, env') =
- elab_specifier keep_ty loc env spec in
+ elab_specifier loc env spec in
if tydef then
error loc "'typedef' is forbidden here";
if inl then
@@ -744,35 +912,40 @@ and elab_name_group keep_ty loc env (spec, namelist) =
error loc "'_Noreturn' is forbidden here";
let elab_one_name env (Name (id, decl, attr, loc)) =
let ((ty, _), env1) =
- elab_type_declarator keep_ty loc env bty false decl in
+ elab_type_declarator loc env bty decl in
let a = elab_attributes env attr in
((id, add_attributes_type a ty), env1) in
(mmap elab_one_name env' namelist, sto)
(* Elaboration of an init-name group *)
-and elab_init_name_group keep_ty loc env (spec, namelist) =
+and elab_init_name_group loc env (spec, namelist) =
let (sto, inl, noret, tydef, bty, env') =
- elab_specifier keep_ty ~only:(namelist=[]) loc env spec in
+ elab_specifier ~only:(namelist=[]) loc env spec in
+ if noret && tydef then
+ error loc "'_Noreturn' can only appear on functions";
let elab_one_name env (Init_name (Name (id, decl, attr, loc), init)) =
let ((ty, _), env1) =
- elab_type_declarator keep_ty loc env bty false decl in
+ elab_type_declarator loc env bty decl in
let a = elab_attributes env attr in
- if inl && not (is_function_type env ty) then
+ let has_fun_typ = is_function_type env ty in
+ if inl && not has_fun_typ then
error loc "'inline' can only appear on functions";
let a' =
if noret then begin
warning loc Celeven_extension "_Noreturn functions are a C11 extension";
- if not (is_function_type env ty) then
+ if not has_fun_typ then
error loc "'_Noreturn' can only appear on functions";
add_attributes [Attr("noreturn",[])] a
end else a in
+ if has_std_alignas env ty && has_fun_typ then
+ error loc "alignment specified for function '%s'" id;
((id, add_attributes_type a' ty, init), env1) in
(mmap elab_one_name env' namelist, sto, tydef)
(* Elaboration of a field group *)
-and elab_field_group keep_ty env (Field_group (spec, fieldlist, loc)) =
+and elab_field_group env (Field_group (spec, fieldlist, loc)) =
let fieldlist = List.map
(function (None, x) -> (Name ("", JUSTBASE, [], loc), x)
@@ -781,7 +954,7 @@ and elab_field_group keep_ty env (Field_group (spec, fieldlist, loc)) =
in
let ((names, env'), sto) =
- elab_name_group keep_ty loc env (spec, List.map fst fieldlist) in
+ elab_name_group loc env (spec, List.map fst fieldlist) in
if sto <> Storage_default then
error loc "non-default storage in struct or union";
@@ -789,10 +962,10 @@ and elab_field_group keep_ty env (Field_group (spec, fieldlist, loc)) =
(* This should actually never be triggered, empty structs are captured earlier *)
warning loc Missing_declarations "declaration does not declare anything";
- let elab_bitfield (Name (_, _, _, loc), optbitsize) (id, ty) =
- let optbitsize' =
+ let elab_bitfield env (Name (_, _, _, loc), optbitsize) (id, ty) =
+ let optbitsize',env' =
match optbitsize with
- | None -> None
+ | None -> None,env
| Some sz ->
let ik =
match unroll env' ty with
@@ -802,40 +975,45 @@ and elab_field_group keep_ty env (Field_group (spec, fieldlist, loc)) =
if integer_rank ik > integer_rank IInt then begin
error loc
"the type of bit-field '%a' must be an integer type no bigger than 'int'" pp_field id;
- None
+ None,env
+ end else if has_std_alignas env' ty then begin
+ error loc "alignment specified for bit-field '%a'" pp_field id;
+ None, env
end else begin
let expr,env' =(!elab_expr_f loc env sz) in
match Ceval.integer_expr env' expr with
| Some n ->
if n < 0L then begin
error loc "bit-field '%a' has negative width (%Ld)" pp_field id n;
- None
+ None,env
end else
let max = Int64.of_int(sizeof_ikind ik * 8) in
if n > max then begin
error loc "size of bit-field '%a' (%Ld bits) exceeds its type (%Ld bits)" pp_field id n max;
- None
+ None,env
end else
if n = 0L && id <> "" then begin
error loc "named bit-field '%a' has zero width" pp_field id;
- None
+ None,env
end else
- Some(Int64.to_int n)
+ Some(Int64.to_int n),env'
| None ->
error loc "bit-field '%a' width not an integer constant" pp_field id;
- None
+ None,env
end in
+ if is_qualified_array ty then
+ error loc "type qualifier used in array declarator outside of function prototype";
let anon_composite = is_anonymous_composite ty in
if id = "" && not anon_composite && optbitsize = None then
warning loc Missing_declarations "declaration does not declare anything";
- { fld_name = id; fld_typ = ty; fld_bitfield = optbitsize'; fld_anonymous = id = "" && anon_composite}
+ { fld_name = id; fld_typ = ty; fld_bitfield = optbitsize'; fld_anonymous = id = "" && anon_composite},env'
in
- (List.map2 elab_bitfield fieldlist names, env')
+ (mmap2 elab_bitfield env' fieldlist names)
(* Elaboration of a struct or union. C99 section 6.7.2.1 *)
-and elab_struct_or_union_info keep_ty kind loc env members attrs =
- let (m, env') = mmap (elab_field_group keep_ty) env members in
+and elab_struct_or_union_info kind loc env members attrs =
+ let (m, env') = mmap elab_field_group env members in
let m = List.flatten m in
let m,_ = mmap (fun c fld ->
if fld.fld_anonymous then
@@ -866,16 +1044,22 @@ and elab_struct_or_union_info keep_ty kind loc env members attrs =
duplicate acc rest in
duplicate [] m;
(* Check for incomplete types *)
- let rec check_incomplete = function
+ let rec check_incomplete only = function
| [] -> ()
- | [ { fld_typ = TArray(ty_elt, None, _) } ] when kind = Struct -> ()
- (* C99: ty[] allowed as last field of a struct *)
+ | [ { fld_typ = TArray(ty_elt, None, _) as typ; fld_name = name } ] when kind = Struct ->
+ (* C99: ty[] allowed as last field of a struct, provided this is not the only field *)
+ if only then
+ error loc "flexible array member '%a' not allowed in otherwise empty struct" pp_field name;
+ check_reduced_alignment loc env' typ
| fld :: rem ->
if wrap incomplete_type loc env' fld.fld_typ then
(* Must be fatal otherwise we get problems constructing the init *)
fatal_error loc "member '%a' has incomplete type" pp_field fld.fld_name;
- check_incomplete rem in
- check_incomplete m;
+ if wrap contains_flex_array_mem loc env' fld.fld_typ && kind = Struct then
+ warning loc Flexible_array_extensions "%a may not be used as a struct member due to flexible array member" (print_typ env) fld.fld_typ;
+ check_reduced_alignment loc env' fld.fld_typ;
+ check_incomplete false rem in
+ check_incomplete true m;
(* Warn for empty structs or unions *)
if m = [] then
if kind = Struct then begin
@@ -883,16 +1067,26 @@ and elab_struct_or_union_info keep_ty kind loc env members attrs =
end else begin
fatal_error loc "empty union is a GNU extension"
end;
+ let ci = composite_info_def env' kind attrs m in
+ (* Warn for reduced alignment *)
+ if attrs <> [] then begin
+ let ci_nat = composite_info_def env' kind [] m in
+ warn_if_reduced_alignment loc
+ ~actual:ci.Env.ci_alignof ~natural:ci_nat.Env.ci_alignof
+ end;
+ (* Final result *)
(composite_info_def env' kind attrs m, env')
-and elab_struct_or_union keep_ty only kind loc tag optmembers attrs env =
+and elab_struct_or_union only kind loc tag optmembers attrs env =
let warn_attrs () =
if attrs <> [] then
- warning loc Unnamed "attribute declaration must precede definition" in
+ warning loc Ignored_attributes "attribute declaration must precede definition" in
let optbinding, tag =
match tag with
| None -> None, ""
| Some s ->
+ if redef Env.lookup_enum env s then
+ error loc "'%s' redeclared as different kind of symbol" s;
Env.lookup_composite env s, s
in
match optbinding, optmembers with
@@ -910,9 +1104,9 @@ and elab_struct_or_union keep_ty only kind loc tag optmembers attrs env =
| Some(tag', ({Env.ci_sizeof = None} as ci)), Some members
when Env.in_current_scope env tag' ->
if ci.Env.ci_kind <> kind then
- error loc "use of '%s' with tag type that does not match previous declaration" tag;
+ fatal_error loc "use of '%s' with tag type that does not match previous declaration" tag;
(* finishing the definition of an incomplete struct or union *)
- let (ci', env') = elab_struct_or_union_info keep_ty kind loc env members attrs in
+ let (ci', env') = elab_struct_or_union_info kind loc env members attrs in
(* Emit a global definition for it *)
emit_elab env' loc (Gcompositedef(kind, tag', attrs, ci'.Env.ci_members));
(* Replace infos but keep same ident *)
@@ -939,7 +1133,7 @@ and elab_struct_or_union keep_ty only kind loc tag optmembers attrs env =
emit_elab env' loc (Gcompositedecl(kind, tag', attrs));
(* elaborate the members *)
let (ci2, env'') =
- elab_struct_or_union_info keep_ty kind loc env' members attrs in
+ elab_struct_or_union_info kind loc env' members attrs in
(* emit a definition *)
emit_elab env'' loc (Gcompositedef(kind, tag', attrs, ci2.Env.ci_members));
(* Replace infos but keep same ident *)
@@ -965,7 +1159,7 @@ and elab_enum_item env ((s, exp), loc) nextval =
if redef Env.lookup_typedef env s then
error loc "'%s' redeclared as different kind of symbol" s;
if not (int_representable v (8 * sizeof_ikind enum_ikind) (is_signed_ikind enum_ikind)) then
- warning loc Constant_conversion "integer literal '%Ld' is too large to be represented in any integer type"
+ warning loc Constant_conversion "integer literal '%Ld' is too large to be represented in the enumeration integer type"
v;
let (id, env') = Env.enter_enum_item env s v in
((id, v, exp'), Int64.succ v, env')
@@ -973,10 +1167,15 @@ and elab_enum_item env ((s, exp), loc) nextval =
(* Elaboration of an enumeration declaration. C99 section 6.7.2.2 *)
and elab_enum only loc tag optmembers attrs env =
- let tag = match tag with None -> "" | Some s -> s in
+ let tag = match tag with
+ | None -> ""
+ | Some s ->
+ if redef Env.lookup_struct env s || redef Env.lookup_union env s then
+ error loc "'%s' redeclared as different kind of symbol" s;
+ s in
match optmembers with
| None ->
- if only then
+ if only && not (redef Env.lookup_enum env tag) then
fatal_error loc
"forward declaration of 'enum %s' is not allowed in ISO C" tag;
let (tag', info) = wrap Env.lookup_enum loc env tag in (tag', env)
@@ -998,10 +1197,12 @@ and elab_enum only loc tag optmembers attrs env =
(* Elaboration of a naked type, e.g. in a cast *)
let elab_type loc env spec decl =
- let (sto, inl, noret, tydef, bty, env') = elab_specifier false loc env spec in
- let ((ty, _), env'') = elab_type_declarator false loc env' bty false decl in
+ let (sto, inl, noret, tydef, bty, env') = elab_specifier loc env spec in
+ let ((ty, _), env'') = elab_type_declarator loc env' bty decl in
+ (* NB: it seems the parser doesn't accept any of the specifiers below.
+ We keep the error message as extra safety. *)
if sto <> Storage_default || inl || noret || tydef then
- error loc "'typedef', 'extern', 'static', 'register' and 'inline' are meaningless in cast";
+ error loc "'typedef', 'extern', 'static', 'auto', 'register' and 'inline' are meaningless in cast";
(ty, env'')
@@ -1040,11 +1241,11 @@ let check_init_type loc env a ty =
else if wrap2 valid_cast loc env a.etyp ty then
if wrap2 int_pointer_conversion loc env a.etyp ty then
warning loc Int_conversion
- "incompatible integer-pointer conversion initializer has type %a instead of the expected type %a"
+ "incompatible integer-pointer conversion: initializer has type %a instead of the expected type %a"
(print_typ env) a.etyp (print_typ env) ty
else
warning loc Unnamed
- "incompatible conversion initializer has type %a instead of the expected type %a"
+ "incompatible conversion: initializer has type %a instead of the expected type %a"
(print_typ env) a.etyp (print_typ env) ty
else
error loc
@@ -1087,6 +1288,9 @@ module I = struct
(* Change the initializer for the current point *)
let set (z, i) i' = (z, i')
+ (* Is the current point at top? *)
+ let at_top = function Ztop(_, _), _ -> true | _, _ -> false
+
(* Put the current point back to the top *)
let rec to_top = function
| Ztop(name, ty), i as zi -> zi
@@ -1372,7 +1576,13 @@ and elab_single zi a il =
from the expression: do as above *)
elab_list (I.set zi (Init_single a)) il false
| TStruct _ | TUnion _ | TArray _ ->
- (* This is an aggregate: we need to drill into it, recursively *)
+ (* This is an aggregate.
+ At top, explicit { } are required. *)
+ if I.at_top zi then begin
+ error loc "invalid initializer, an initializer list was expected";
+ raise Exit
+ end;
+ (* Otherwise we need to drill into the aggregate, recursively *)
begin match I.first env zi with
| I.OK zi' ->
elab_single zi' a il
@@ -1434,23 +1644,51 @@ let elab_initializer loc env root ty ie =
(fixup_typ loc env ty init, Some init)
+(* Contexts for elaborating statements and expressions *)
+
+type elab_context = {
+ ctx_return_typ: typ; (**r return type for the function *)
+ ctx_labels: StringSet.t; (**r all labels defined in the function *)
+ ctx_break: bool; (**r is 'break' allowed? *)
+ ctx_continue: bool; (**r is 'continue' allowed? *)
+ ctx_in_switch: bool; (**r are 'case' and 'default' allowed? *)
+ ctx_vararg: bool; (**r is this a vararg function? *)
+ ctx_nonstatic_inline: bool (**r is this a nonstatic inline function? *)
+}
+
+(* Context for evaluating compile-time constant expressions.
+ Only the [ctx_vararg] and [ctx_nonstatic_inline] fields matter. *)
+let ctx_constexp = {
+ ctx_return_typ = TVoid [];
+ ctx_labels = StringSet.empty;
+ ctx_break = false; ctx_continue = false; ctx_in_switch = false;
+ ctx_vararg = false; ctx_nonstatic_inline = false
+}
+
+
(* Elaboration of expressions *)
-let elab_expr vararg loc env a =
+let elab_expr ctx loc env a =
- let err fmt = error loc fmt in (* non-fatal error *)
- let error fmt = fatal_error loc fmt in
- let warning t fmt =
- warning loc t fmt in
+ let error fmt = error loc fmt in
+ let fatal_error fmt = fatal_error loc fmt in
+ let warning t fmt = warning loc t fmt in
let check_ptr_arith env ty s =
match unroll env ty with
| TVoid _ ->
- err "illegal arithmetic on a pointer to void in binary '%c'" s
+ error "illegal arithmetic on a pointer to void in binary '%c'" s
| TFun _ ->
- err "illegal arithmetic on a pointer to the function type %a in binary '%c'" (print_typ env) ty s
+ error "illegal arithmetic on a pointer to the function type %a in binary '%c'" (print_typ env) ty s
| _ -> if incomplete_type env ty then
- err "arithmetic on a pointer to an incomplete type %a in binary '%c'" (print_typ env) ty s
+ error "arithmetic on a pointer to an incomplete type %a in binary '%c'" (print_typ env) ty s
+ in
+
+ let check_static_var id sto ty =
+ if ctx.ctx_nonstatic_inline
+ && sto = Storage_static
+ && List.mem AConst (attributes_of_type env ty)
+ then warning Static_in_inline "static variable '%s' is used in an inline function with external linkage" id.C.name
in
let rec elab env = function
@@ -1459,7 +1697,8 @@ let elab_expr vararg loc env a =
| VARIABLE s ->
begin match wrap Env.lookup_ident loc env s with
- | (id, Env.II_ident(sto, ty)) ->
+ | (id, Env.II_ident(sto, ty)) ->
+ check_static_var id sto ty;
{ edesc = EVar id; etyp = ty },env
| (id, Env.II_enum v) ->
{ edesc = EConst(CEnum(id, v)); etyp = TInt(enum_ikind, []) },env
@@ -1478,7 +1717,7 @@ let elab_expr vararg loc env a =
match (unroll env b1.etyp, unroll env b2.etyp) with
| (TPtr(t, _) | TArray(t, _, _)), (TInt _ | TEnum _) -> t
| (TInt _ | TEnum _), (TPtr(t, _) | TArray(t, _, _)) -> t
- | t1, t2 -> error "subscripted value is neither an array nor pointer" in
+ | t1, t2 -> fatal_error "subscripted value is neither an array nor pointer" in
{ edesc = EBinop(Oindex, b1, b2, TPtr(tres, [])); etyp = tres },env
| MEMBEROF(a1, fieldname) ->
@@ -1490,7 +1729,7 @@ let elab_expr vararg loc env a =
| TUnion(id, attrs) ->
(wrap Env.find_union_member loc env (id, fieldname), attrs)
| _ ->
- error "request for member '%s' in something not a structure or union" fieldname in
+ fatal_error "request for member '%s' in something not a structure or union" fieldname in
(* A field of a const/volatile struct or union is itself const/volatile *)
let rec access = function
| [] -> b1
@@ -1512,10 +1751,10 @@ let elab_expr vararg loc env a =
| TUnion(id, attrs) ->
(wrap Env.find_union_member loc env (id, fieldname), attrs)
| _ ->
- error "request for member '%s' in something not a structure or union" fieldname
+ fatal_error "request for member '%s' in something not a structure or union" fieldname
end
| _ ->
- error "member reference type %a is not a pointer" (print_typ env) b1.etyp in
+ fatal_error "member reference type %a is not a pointer" (print_typ env) b1.etyp in
let rec access = function
| [] -> assert false
| [fld] ->
@@ -1538,8 +1777,8 @@ let elab_expr vararg loc env a =
(elaboration) --> __builtin_va_arg(ap, sizeof(ty))
*)
| CALL((VARIABLE "__builtin_va_start" as a1), [a2; a3]) ->
- if not vararg then
- err "'va_start' used in function with fixed args";
+ if not ctx.ctx_vararg then
+ error "'va_start' used in function with fixed args";
let b1,env = elab env a1 in
let b2,env = elab env a2 in
let _b3,env = elab env a3 in
@@ -1584,9 +1823,9 @@ let elab_expr vararg loc env a =
| TPtr(ty, a) ->
begin match unroll env ty with
| TFun(res, args, vararg, a) -> (res, args, vararg)
- | _ -> error "called object type %a is neither a function nor function pointer" (print_typ env) b1.etyp
+ | _ -> fatal_error "called object type %a is neither a function nor function pointer" (print_typ env) b1.etyp
end
- | _ -> error "called object type %a is neither a function nor function pointer" (print_typ env) b1.etyp
+ | _ -> fatal_error "called object type %a is neither a function nor function pointer" (print_typ env) b1.etyp
in
(* Type-check the arguments against the prototype *)
let bl',env =
@@ -1608,18 +1847,18 @@ let elab_expr vararg loc env a =
if not (wrap2 valid_cast loc env b1.etyp ty) then
begin match unroll env b1.etyp, unroll env ty with
| _, (TStruct _|TUnion _ | TVoid _) ->
- err "used type %a where arithmetic or pointer type is required"
+ error "used type %a where arithmetic or pointer type is required"
(print_typ env) ty
| (TStruct _| TUnion _ | TVoid _),_ ->
- err "operand of type %a where arithmetic or pointer type is required"
+ error "operand of type %a where arithmetic or pointer type is required"
(print_typ env) b1.etyp
| TFloat _, TPtr _ ->
- err "operand of type %a cannot be cast to a pointer type"
+ error "operand of type %a cannot be cast to a pointer type"
(print_typ env) b1.etyp
| TPtr _ , TFloat _ ->
- err "pointer cannot be cast to type %a" (print_typ env) ty
+ error "pointer cannot be cast to type %a" (print_typ env) ty
| _ ->
- err "illegal cast from %a to %a" (print_typ env) b1.etyp (print_typ env) ty
+ error "illegal cast from %a to %a" (print_typ env) b1.etyp (print_typ env) ty
end;
{ edesc = ECast(ty, b1); etyp = ty },env
@@ -1629,7 +1868,7 @@ let elab_expr vararg loc env a =
let (ty, env) = elab_type loc env spec dcl in
begin match elab_initializer loc env "<compound literal>" ty ie with
| (ty', Some i) -> { edesc = ECompound(ty', i); etyp = ty' },env
- | (ty', None) -> error "ill-formed compound literal"
+ | (ty', None) -> fatal_error "ill-formed compound literal"
end
(* 6.5.3 Unary expressions *)
@@ -1637,54 +1876,39 @@ let elab_expr vararg loc env a =
| EXPR_SIZEOF a1 ->
let b1,env = elab env a1 in
if wrap incomplete_type loc env b1.etyp then
- error "invalid application of 'sizeof' to an incomplete type %a" (print_typ env) b1.etyp;
+ fatal_error "invalid application of 'sizeof' to an incomplete type %a" (print_typ env) b1.etyp;
if wrap is_bitfield loc env b1 then
- error "invalid application of 'sizeof' to a bit-field";
- let bdesc =
- (* Catch special cases sizeof("string literal") *)
- match b1.edesc with
- | EConst(CStr s) ->
- let sz = String.length s + 1 in
- EConst(CInt(Int64.of_int sz, size_t_ikind(), ""))
- | EConst(CWStr s) ->
- let sz = (!config).sizeof_wchar * (List.length s + 1) in
- EConst(CInt(Int64.of_int sz, size_t_ikind(), ""))
- | _ ->
- ESizeof b1.etyp in
- { edesc = bdesc; etyp = TInt(size_t_ikind(), []) },env
+ fatal_error "invalid application of 'sizeof' to a bit-field";
+ { edesc = ESizeof b1.etyp; etyp = TInt(size_t_ikind(), []) },env
| TYPE_SIZEOF (spec, dcl) ->
let (ty, env') = elab_type loc env spec dcl in
if wrap incomplete_type loc env' ty then
- error "invalid application of 'sizeof' to an incomplete type %a" (print_typ env) ty;
+ fatal_error "invalid application of 'sizeof' to an incomplete type %a" (print_typ env) ty;
{ edesc = ESizeof ty; etyp = TInt(size_t_ikind(), []) },env'
- | EXPR_ALIGNOF a1 ->
- let b1,env = elab env a1 in
- if wrap incomplete_type loc env b1.etyp then
- error "invalid application of '_Alignof' to an incomplete type %a" (print_typ env) b1.etyp;
- if wrap is_bitfield loc env b1 then
- error "invalid application of '_Alignof' to a bit-field";
- { edesc = EAlignof b1.etyp; etyp = TInt(size_t_ikind(), []) },env
-
- | TYPE_ALIGNOF (spec, dcl) ->
+ | ALIGNOF (spec, dcl) ->
let (ty, env') = elab_type loc env spec dcl in
+ warning Celeven_extension "'_Alignof' is a C11 extension";
if wrap incomplete_type loc env' ty then
- error "invalid application of 'alignof' to an incomplete type %a" (print_typ env) ty;
+ fatal_error "invalid application of 'alignof' to an incomplete type %a" (print_typ env) ty;
{ edesc = EAlignof ty; etyp = TInt(size_t_ikind(), []) },env'
| BUILTIN_OFFSETOF ((spec,dcl), mem) ->
let (ty,env) = elab_type loc env spec dcl in
if incomplete_type env ty then
- error "offsetof of incomplete type %a" (print_typ env) ty;
+ fatal_error "offsetof of incomplete type %a" (print_typ env) ty;
let members env ty mem =
match ty with
| TStruct (id,_) -> wrap Env.find_struct_member loc env (id,mem)
| TUnion (id,_) -> wrap Env.find_union_member loc env (id,mem)
- | _ -> error "request for member '%s' in something not a structure or union" mem in
+ | _ -> fatal_error "request for member '%s' in something not a structure or union" mem in
let rec offset_of_list acc env ty = function
| [] -> acc,ty
- | fld::rest -> let off = offsetof env ty fld in
+ | fld::rest ->
+ if fld.fld_bitfield <> None then
+ fatal_error "cannot compute offset of bit-field '%s'" fld.fld_name;
+ let off = offsetof env ty fld in
offset_of_list (acc+off) env fld.fld_typ rest in
let offset_of_member (env,off_accu,ty) mem =
match mem,unroll env ty with
@@ -1696,16 +1920,16 @@ let elab_expr vararg loc env a =
| ATINDEX_INIT e,TArray (sub_ty,_,_) ->
let e,env = elab env e in
let e = match Ceval.integer_expr env e with
- | None -> error "array element designator for is not an integer constant expression"
+ | None -> fatal_error "array element designator is not an integer constant expression"
| Some n-> n in
let size = match sizeof env sub_ty with
| None -> assert false (* We expect only complete types *)
| Some s -> s in
let off_accu = match cautious_mul e size with
- | None -> error "'offsetof' overflows"
+ | None -> fatal_error "'offsetof' overflows"
| Some s -> off_accu + s in
env,off_accu,sub_ty
- | ATINDEX_INIT _,_ -> error "subscripted value is not an array" in
+ | ATINDEX_INIT _,_ -> fatal_error "subscripted value is not an array" in
let env,offset,_ = List.fold_left offset_of_member (env,0,ty) mem in
let size_t = size_t_ikind () in
let offset = Ceval.normalize_int (Int64.of_int offset) size_t in
@@ -1715,46 +1939,46 @@ let elab_expr vararg loc env a =
| UNARY(PLUS, a1) ->
let b1,env = elab env a1 in
if not (is_arith_type env b1.etyp) then
- error "invalid argument type %a to unary '+'" (print_typ env) b1.etyp;
+ fatal_error "invalid argument type %a to unary '+'" (print_typ env) b1.etyp;
{ edesc = EUnop(Oplus, b1); etyp = unary_conversion env b1.etyp },env
| UNARY(MINUS, a1) ->
let b1,env = elab env a1 in
if not (is_arith_type env b1.etyp) then
- error "invalid argument type %a to unary '-'" (print_typ env) b1.etyp;
+ fatal_error "invalid argument type %a to unary '-'" (print_typ env) b1.etyp;
{ edesc = EUnop(Ominus, b1); etyp = unary_conversion env b1.etyp },env
| UNARY(BNOT, a1) ->
let b1,env = elab env a1 in
if not (is_integer_type env b1.etyp) then
- error "invalid argument type %a to unary '~'" (print_typ env) b1.etyp;
+ fatal_error "invalid argument type %a to unary '~'" (print_typ env) b1.etyp;
{ edesc = EUnop(Onot, b1); etyp = unary_conversion env b1.etyp },env
| UNARY(NOT, a1) ->
let b1,env = elab env a1 in
if not (is_scalar_type env b1.etyp) then
- error "invalid argument type %a to unary '!'" (print_typ env) b1.etyp;
+ fatal_error "invalid argument type %a to unary '!'" (print_typ env) b1.etyp;
{ edesc = EUnop(Olognot, b1); etyp = TInt(IInt, []) },env
| UNARY(ADDROF, a1) ->
let b1,env = elab env a1 in
if not (is_lvalue b1 || is_function_type env b1.etyp) then
- err "argument of '&' is not an lvalue (invalid %a)" (print_typ env) b1.etyp;
+ error "argument of '&' is not an lvalue (invalid %a)" (print_typ env) b1.etyp;
begin match b1.edesc with
| EVar id ->
begin match wrap Env.find_ident loc env id with
| Env.II_ident(Storage_register, _) ->
- err "address of register variable '%s' requested" id.C.name
+ error "address of register variable '%s' requested" id.C.name
| _ -> ()
end
| EUnop(Odot f, b2) ->
let fld = wrap2 field_of_dot_access loc env b2.etyp f in
if fld.fld_bitfield <> None then
- err "address of bit-field '%s' requested" f
+ error "address of bit-field '%s' requested" f
| EUnop(Oarrow f, b2) ->
let fld = wrap2 field_of_arrow_access loc env b2.etyp f in
if fld.fld_bitfield <> None then
- err "address of bit-field '%s' requested" f
+ error "address of bit-field '%s' requested" f
| _ -> ()
end;
{ edesc = EUnop(Oaddrof, b1); etyp = TPtr(b1.etyp, []) },env
@@ -1767,7 +1991,7 @@ let elab_expr vararg loc env a =
| TPtr(ty, _) | TArray(ty, _, _) ->
{ edesc = EUnop(Oderef, b1); etyp = ty },env
| _ ->
- error "arguemnt of unary '*' is not a pointer (%a invalid)"
+ fatal_error "argument of unary '*' is not a pointer (%a invalid)"
(print_typ env) b1.etyp
end
@@ -1798,7 +2022,7 @@ let elab_expr vararg loc env a =
match unroll env b1.etyp, unroll env b2.etyp with
| (TPtr(ty, a) | TArray(ty, _, a)), (TInt _ | TEnum _) -> ty
| (TInt _ | TEnum _), (TPtr(ty, a) | TArray(ty, _, a)) -> ty
- | _, _ -> error "invalid operands to binary '+' (%a and %a)"
+ | _, _ -> fatal_error "invalid operands to binary '+' (%a and %a)"
(print_typ env) b1.etyp (print_typ env) b2.etyp
in
check_ptr_arith env ty '+';
@@ -1817,21 +2041,19 @@ let elab_expr vararg loc env a =
match wrap unroll loc env b1.etyp, wrap unroll loc env b2.etyp with
| (TPtr(ty, a) | TArray(ty, _, a)), (TInt _ | TEnum _) ->
if not (wrap pointer_arithmetic_ok loc env ty) then
- err "illegal pointer arithmetic in binary '-'";
- (TPtr(ty, []), TPtr(ty, []))
- | (TInt _ | TEnum _), (TPtr(ty, a) | TArray(ty, _, a)) ->
- check_ptr_arith env ty '-';
+ error "illegal pointer arithmetic in binary '-'";
(TPtr(ty, []), TPtr(ty, []))
| (TPtr(ty1, a1) | TArray(ty1, _, a1)),
(TPtr(ty2, a2) | TArray(ty2, _, a2)) ->
if not (compatible_types AttrIgnoreAll env ty1 ty2) then
- err "%a and %a are not pointers to compatible types"
+ error "%a and %a are not pointers to compatible types"
(print_typ env) b1.etyp (print_typ env) b1.etyp;
check_ptr_arith env ty1 '-';
+ check_ptr_arith env ty2 '-';
if wrap sizeof loc env ty1 = Some 0 then
- err "subtraction between two pointers to zero-sized objects";
+ error "subtraction between two pointers to zero-sized objects";
(TPtr(ty1, []), TInt(ptrdiff_t_ikind(), []))
- | _, _ -> error "invalid operands to binary '-' (%a and %a)"
+ | _, _ -> fatal_error "invalid operands to binary '-' (%a and %a)"
(print_typ env) b1.etyp (print_typ env) b2.etyp
end in
{ edesc = EBinop(Osub, b1, b2, tyop); etyp = tyres },env
@@ -1875,7 +2097,7 @@ let elab_expr vararg loc env a =
let b2,env = elab env a2 in
let b3,env = elab env a3 in
if not (is_scalar_type env b1.etyp) then
- err "first argument of '?:' is not a scalar type (invalid %a)"
+ error "first argument of '?:' is not a scalar type (invalid %a)"
(print_typ env) b1.etyp;
begin match pointer_decay env b2.etyp, pointer_decay env b3.etyp with
| (TInt _ | TFloat _ | TEnum _), (TInt _ | TFloat _ | TEnum _) ->
@@ -1903,7 +2125,7 @@ let elab_expr vararg loc env a =
| ty1, ty2 ->
match combine_types AttrIgnoreAll env ty1 ty2 with
| None ->
- error "the second and third argument of '?:' incompatible types (%a and %a)"
+ fatal_error "the second and third argument of '?:' incompatible types (%a and %a)"
(print_typ env) ty1 (print_typ env) ty2
| Some tyres ->
{ edesc = EConditional(b1, b2, b3); etyp = tyres },env
@@ -1917,7 +2139,7 @@ let elab_expr vararg loc env a =
if List.mem AConst (attributes_of_type env b1.etyp) then
error "left-hand side of assignment has 'const' type";
if not (is_modifiable_lvalue env b1) then
- err "expression is not assignable";
+ error "expression is not assignable";
if not (wrap2 valid_assignment loc env b2 b1.etyp) then begin
if wrap2 valid_cast loc env b2.etyp b1.etyp then
if wrap2 int_pointer_conversion loc env b2.etyp b1.etyp then
@@ -1926,10 +2148,10 @@ let elab_expr vararg loc env a =
(print_typ env) b1.etyp (print_typ env) b2.etyp
else
warning Unnamed
- "incompatible conversion assigning to %a from %a"
+ "incompatible conversion: assigning to %a from %a"
(print_typ env) b1.etyp (print_typ env) b2.etyp
else
- err "assigning to %a from incompatible type %a"
+ error "assigning to %a from incompatible type %a"
(print_typ env) b1.etyp (print_typ env) b2.etyp;
end;
{ edesc = EBinop(Oassign, b1, b2, b1.etyp); etyp = b1.etyp },env
@@ -1953,9 +2175,9 @@ let elab_expr vararg loc env a =
begin match elab env (BINARY(sop, a1, a2)) with
| ({ edesc = EBinop(_, b1, b2, _); etyp = ty } as b),env ->
if List.mem AConst (attributes_of_type env b1.etyp) then
- err "left-hand side of assignment has 'const' type";
+ error "left-hand side of assignment has 'const' type";
if not (is_modifiable_lvalue env b1) then
- err "expression is not assignable";
+ error "expression is not assignable";
if not (wrap2 valid_assignment loc env b b1.etyp) then begin
if wrap2 valid_cast loc env ty b1.etyp then
if wrap2 int_pointer_conversion loc env ty b1.etyp then
@@ -1964,10 +2186,10 @@ let elab_expr vararg loc env a =
(print_typ env) b1.etyp (print_typ env) ty
else
warning Unnamed
- "incompatible conversion assigning to %a from %a"
+ "incompatible conversion: assigning to %a from %a"
(print_typ env) b1.etyp (print_typ env) ty
else
- err "assigning to %a from incompatible type %a"
+ error "assigning to %a from incompatible type %a"
(print_typ env) b1.etyp (print_typ env) ty;
end;
{ edesc = EBinop(top, b1, b2, ty); etyp = b1.etyp },env
@@ -1986,9 +2208,9 @@ let elab_expr vararg loc env a =
and elab_pre_post_incr_decr op msg a1 =
let b1,env = elab env a1 in
if not (is_modifiable_lvalue env b1) then
- err "expression is not assignable";
+ error "expression is not assignable";
if not (is_scalar_type env b1.etyp) then
- err "cannot %s value of type %a" msg (print_typ env) b1.etyp;
+ error "cannot %s value of type %a" msg (print_typ env) b1.etyp;
{ edesc = EUnop(op, b1); etyp = b1.etyp },env
(* Elaboration of binary operators over integers *)
@@ -1996,7 +2218,7 @@ let elab_expr vararg loc env a =
let b1,env = elab env a1 in
let b2,env = elab env a2 in
if not ((is_integer_type env b1.etyp) && (is_integer_type env b2.etyp)) then
- error "invalid operands to binary '%s' (%a and %a)" msg
+ fatal_error "invalid operands to binary '%s' (%a and %a)" msg
(print_typ env) b1.etyp (print_typ env) b2.etyp;
let tyres = binary_conversion env b1.etyp b2.etyp in
{ edesc = EBinop(op, b1, b2, tyres); etyp = tyres },env
@@ -2006,7 +2228,7 @@ let elab_expr vararg loc env a =
let b1,env = elab env a1 in
let b2,env = elab env a2 in
if not ((is_arith_type env b1.etyp) && (is_arith_type env b2.etyp)) then
- error "invalid operands to binary '%s' (%a and %a)" msg
+ fatal_error "invalid operands to binary '%s' (%a and %a)" msg
(print_typ env) b1.etyp (print_typ env) b2.etyp;
let tyres = binary_conversion env b1.etyp b2.etyp in
{ edesc = EBinop(op, b1, b2, tyres); etyp = tyres },env
@@ -2016,7 +2238,7 @@ let elab_expr vararg loc env a =
let b1,env = elab env a1 in
let b2,env = elab env a2 in
if not ((is_integer_type env b1.etyp) && (is_integer_type env b2.etyp)) then
- error "invalid operands to '%s' (%a and %a)" msg
+ fatal_error "invalid operands to '%s' (%a and %a)" msg
(print_typ env) b1.etyp (print_typ env) b2.etyp;
let tyres = unary_conversion env b1.etyp in
{ edesc = EBinop(op, b1, b2, tyres); etyp = tyres },env
@@ -2043,6 +2265,10 @@ let elab_expr vararg loc env a =
if not (compatible_types AttrIgnoreAll env ty1 ty2) then
warning Compare_distinct_pointer_types "comparison of distinct pointer types (%a and %a)"
(print_typ env) b1.etyp (print_typ env) b2.etyp;
+ let incomp_ty1 = wrap incomplete_type loc env ty1
+ and incomp_ty2 = wrap incomplete_type loc env ty2 in
+ if incomp_ty1 <> incomp_ty2 then
+ warning Unnamed "comparison of complete and incomplete pointers";
EBinop(op, b1, b2, TPtr(ty1, []))
| TPtr _, (TInt _ | TEnum _)
| (TInt _ | TEnum _), TPtr _ ->
@@ -2050,7 +2276,7 @@ let elab_expr vararg loc env a =
(print_typ env) b1.etyp (print_typ env) b2.etyp;
EBinop(op, b1, b2, TPtr(TVoid [], []))
| ty1, ty2 ->
- error "illegal comparison between types@ %a@ and %a"
+ fatal_error "illegal comparison between types@ %a@ and %a"
(print_typ env) b1.etyp (print_typ env) b2.etyp; in
{ edesc = resdesc; etyp = TInt(IInt, []) },env
@@ -2059,7 +2285,7 @@ let elab_expr vararg loc env a =
let b1,env = elab env a1 in
let b2,env = elab env a2 in
if not ((is_scalar_type env b1.etyp) && (is_scalar_type env b2.etyp)) then
- error "invalid operands to binary %s (%a and %a)" msg
+ fatal_error "invalid operands to binary '%s' (%a and %a)" msg
(print_typ env) b1.etyp (print_typ env) b2.etyp;
{ edesc = EBinop(op, b1, b2, TInt(IInt, [])); etyp = TInt(IInt, []) },env
@@ -2071,14 +2297,14 @@ let elab_expr vararg loc env a =
let found = argno - 1 in
let expected = List.length params + found in
let vararg = if vararg then "at least " else "" in
- err "too few arguments to function call, expected %s%d, have %d" vararg expected found; [],env
+ error "too few arguments to function call, expected %s%d, have %d" vararg expected found; [],env
| (_::_,env), [] ->
if vararg
then args
else
let expected = argno - 1 in
let found = List.length (fst args) + expected in
- (err "too many arguments to function call, expected %d, have %d" expected found; args)
+ (error "too many arguments to function call, expected %d, have %d" expected found; args)
| (arg1 :: argl,env), (_, ty_p) :: paraml ->
let ty_a = argument_conversion env arg1.etyp in
if not (wrap2 valid_assignment loc env {arg1 with etyp = ty_a} ty_p)
@@ -2090,10 +2316,10 @@ let elab_expr vararg loc env a =
(print_typ env) ty_a argno (print_typ env) ty_p
else
warning Unnamed
- "incompatible conversion passing %a to parameter %d of type %a"
+ "incompatible conversion: passing %a to parameter %d of type %a"
(print_typ env) ty_a argno (print_typ env) ty_p end
else
- err
+ error
"passing %a to parameter %d of incompatible type %a"
(print_typ env) ty_a argno (print_typ env) ty_p
end;
@@ -2102,16 +2328,16 @@ let elab_expr vararg loc env a =
in elab env a
(* Filling in forward declaration *)
-let _ = elab_expr_f := (elab_expr false)
+let _ = elab_expr_f := (elab_expr ctx_constexp)
-let elab_opt_expr vararg loc env = function
+let elab_opt_expr ctx loc env = function
| None -> None,env
- | Some a -> let a,env = (elab_expr vararg loc env a) in
+ | Some a -> let a,env = (elab_expr ctx loc env a) in
Some a,env
-let elab_for_expr vararg loc env = function
+let elab_for_expr ctx loc env = function
| None -> { sdesc = Sskip; sloc = elab_loc loc },env
- | Some a -> let a,env = elab_expr vararg loc env a in
+ | Some a -> let a,env = elab_expr ctx loc env a in
{ sdesc = Sdo a; sloc = elab_loc loc },env
(* Handling of __func__ (section 6.4.2.2) *)
@@ -2125,49 +2351,69 @@ let __func__type_and_init s =
let enter_typedefs loc env sto dl =
if sto <> Storage_default then
- error loc "non-default storage-class on 'typedef' definition";
+ error loc "non-default storage class on 'typedef' definition";
+ if dl = [] then
+ warning loc Missing_declarations "typedef requires a name";
List.fold_left (fun env (s, ty, init) ->
if init <> NO_INIT then
error loc "initializer in typedef";
+ if has_std_alignas env ty then
+ error loc "alignment specified for typedef '%s'" s;
match previous_def Env.lookup_typedef env s with
- | Some (s',ty') ->
+ | Some (s',ty') when Env.in_current_scope env s' ->
if equal_types env ty ty' then begin
- warning loc Celeven_extension "redefinition of typedef '%s' is C11 extension" s;
+ warning loc Celeven_extension "redefinition of typedef '%s' is a C11 extension" s;
env
end else begin
error loc "typedef redefinition with different types (%a vs %a)"
(print_typ env) ty (print_typ env) ty';
env
end
- | None ->
+ | _ ->
if redef Env.lookup_ident env s then
error loc "redefinition of '%s' as different kind of symbol" s;
let (id, env') = Env.enter_typedef env s ty in
+ check_reduced_alignment loc env' ty;
emit_elab env loc (Gtypedef(id, ty));
env') env dl
-let enter_decdefs local loc env sto dl =
+let enter_decdefs local nonstatic_inline loc env sto dl =
(* Sanity checks on storage class *)
- if sto = Storage_register && not local then
- fatal_error loc "'register' storage-class on file-scoped variable";
+ if (sto = Storage_auto || sto = Storage_register) && not local then
+ fatal_error loc "illegal storage class %s on file-scoped variable"
+ (name_of_storage_class sto);
if sto <> Storage_default && dl = [] then
warning loc Missing_declarations "declaration does not declare anything";
let enter_decdef (decls, env) (s, ty, init) =
let isfun = is_function_type env ty in
+ if sto = Storage_register && has_std_alignas env ty then
+ error loc "alignment specified for 'register' object '%s'" s;
if sto = Storage_extern && init <> NO_INIT then
- error loc "'extern' declaration variable has an initializer";
+ error loc "'extern' declaration variable has an initializer";
if local && isfun then begin
match sto with
- | Storage_static -> error loc "function declared in block scope cannot have 'static' storage-class";
- | Storage_register -> error loc "invalid 'register' storage-class on function";
+ | Storage_static ->
+ error loc "function declared in block scope cannot have 'static' storage class"
+ | Storage_auto | Storage_register ->
+ error loc "illegal storage class %s on function"
+ (name_of_storage_class sto)
| _ -> ()
end;
- (* Local function declarations are always treated as extern *)
- let sto1 = if local && isfun then Storage_extern else sto in
+ if is_qualified_array ty then
+ error loc "type qualifier used in array declarator outside of function prototype";
+ (* Local variable declarations with default storage are treated as 'auto'.
+ Local function declarations with default storage remain with
+ default storage. *)
+ let sto1 =
+ if local && sto = Storage_default && not isfun
+ then Storage_auto
+ else sto in
(* enter ident in environment with declared type, because
initializer can refer to the ident *)
let (id, sto', env1, ty, linkage) =
enter_or_refine_ident local loc env s sto1 ty in
+ if init <> NO_INIT && not local then
+ add_global_define loc s;
if not isfun && is_void_type env ty then
fatal_error loc "'%s' has incomplete type" s;
(* process the initializer *)
@@ -2175,16 +2421,30 @@ let enter_decdefs local loc env sto dl =
(* update environment with refined type *)
let env2 = Env.add_ident env1 id sto' ty' in
(* check for incomplete type *)
- if local && sto' <> Storage_extern
- && not isfun
- && wrap incomplete_type loc env ty' then
- error loc "variable has incomplete type %a" (print_typ env) ty';
+ if not isfun && wrap incomplete_type loc env ty' then
+ if not local && sto' = Storage_static then begin
+ warning loc Tentative_incomplete_static "tentative static definition with incomplete type";
+ end else if local && sto' <> Storage_extern then
+ error loc "variable has incomplete type %a" (print_typ env) ty';
+ (* check if alignment is reduced *)
+ check_reduced_alignment loc env ty';
+ (* check for static variables in nonstatic inline functions *)
+ if local && nonstatic_inline
+ && sto' = Storage_static
+ && not (List.mem AConst (attributes_of_type env ty')) then
+ warning loc Static_in_inline "non-constant static local variable '%s' in inline function may be different in different files" s;
if local && not isfun && sto' <> Storage_extern && sto' <> Storage_static then
(* Local definition *)
((sto', id, ty', init') :: decls, env2)
else begin
(* Global definition *)
emit_elab ~linkage env2 loc (Gdecl(sto', id, ty', init'));
+ (* Make sure the initializer is constant. *)
+ begin match init' with
+ | Some i when not (Ceval.is_constant_init env2 i) ->
+ error loc "initializer is not a compile-time constant"
+ | _ -> ()
+ end;
(decls, env2)
end in
let (decls, env') = List.fold_left enter_decdef ([], env) dl in
@@ -2216,7 +2476,7 @@ let elab_KR_function_parameters env params defs loc =
(* Check that the declarations only declare parameters *)
let extract_name (Init_name(Name(s, dty, attrs, loc') as name, ie)) =
if not (List.mem s params) then
- error loc' "Declaration of '%s' which is not a function parameter" s;
+ error loc' "declaration of '%s' which is not a function parameter" s;
if ie <> NO_INIT then
error loc' "illegal initialization of parameter '%s'" s;
name
@@ -2225,18 +2485,17 @@ let elab_KR_function_parameters env params defs loc =
let elab_param_def env = function
| DECDEF((spec', name_init_list), loc') ->
let name_list = List.map extract_name name_init_list in
- let (paramsenv, sto) = elab_name_group true loc' env (spec', name_list) in
- begin match sto with
- | Storage_extern ->
- error loc' "invalid 'extern' storage-class specifier for function parameter"
- | Storage_static ->
- error loc' "invalid 'static' storage-class specifier for function parameter"
- | _ -> ()
- end;
+ if name_list = [] then
+ error loc' "declaration does not declare a parameter";
+ let (paramsenv, sto) = elab_name_group loc' env (spec', name_list) in
+ if sto <> Storage_default && sto <> Storage_register then
+ error loc' (* NB: 'auto' not allowed *)
+ "invalid storage class %s for function parameter"
+ (name_of_storage_class sto);
paramsenv
| d -> (* Should never be produced by the parser *)
fatal_error (Cabshelper.get_definitionloc d)
- "Illegal declaration of function parameter" in
+ "illegal declaration of function parameter" in
let kr_params_defs,paramsenv =
let params,paramsenv = mmap elab_param_def env defs in
List.concat params,paramsenv in
@@ -2296,11 +2555,22 @@ let inherit_vararg env s sto ty =
(* Function definitions *)
-let elab_fundef env spec name defs body loc =
- let (s, sto, inline, noret, ty, kr_params, env1) =
- elab_fundef_name true env spec name in
- if sto = Storage_register then
- fatal_error loc "invalid 'register' storage-class on function";
+let elab_fundef genv spec name defs body loc =
+ (* We maintain two environments:
+ - genv is the "global", file-scope environment. It is enriched
+ with the declaration of the function, and also with
+ structs and unions defined as part of its return type.
+ - lenv is the "local" environment used to elaborate the function body.
+ It contains everything that genv contains, including
+ a declaration for the function, so as to support recursive calls.
+ In addition, it contains declarations for function parameters
+ and structs and unions defined in the parameter list. *)
+ let (fun_id, sto, inline, noret, ty, kr_params, genv, lenv) =
+ elab_fundef_name genv spec name in
+ let s = fun_id.C.name in
+ if sto = Storage_auto || sto = Storage_register then
+ fatal_error loc "invalid storage class %s on function"
+ (name_of_storage_class sto);
begin match kr_params, defs with
| None, d::_ ->
error (Cabshelper.get_definitionloc d)
@@ -2310,54 +2580,77 @@ let elab_fundef env spec name defs body loc =
(* Process the parameters and the K&R declarations, if any, to obtain:
- [ty]: the full, prototyped type of the function
- [extra_decls]: extra declarations to be inserted at the
- beginning of the function *)
- let (ty, extra_decls,env1) =
+ beginning of the function
+ - [lenv]: a first cut at the local environment, containing in particular
+ the structs and unions defined in the parameter list. *)
+ let (ty, extra_decls, lenv) =
match ty, kr_params with
| TFun(ty_ret, None, vararg, attr), None ->
- (TFun(ty_ret, Some [], vararg, attr), [],env1)
+ (TFun(ty_ret, Some [], vararg, attr), [], lenv)
| ty, None ->
- (ty, [],env1)
+ (ty, [], lenv)
| TFun(ty_ret, None, false, attr), Some params ->
warning loc CompCert_conformance "non-prototype, pre-standard function definition, converting to prototype form";
- let (params', extra_decls,env) =
- elab_KR_function_parameters env params defs loc in
- (TFun(ty_ret, Some params', inherit_vararg env s sto ty, attr), extra_decls,env)
+ let (params', extra_decls, lenv) =
+ elab_KR_function_parameters lenv params defs loc in
+ (TFun(ty_ret, Some params', inherit_vararg genv s sto ty, attr), extra_decls, lenv)
| _, Some params ->
assert false
in
- (* Extract infos from the type of the function *)
+ (* Extract infos from the type of the function.
+ Checks on the return type must be done in the global environment. *)
let (ty_ret, params, vararg, attr) =
match ty with
| TFun(ty_ret, Some params, vararg, attr) ->
- if wrap incomplete_type loc env1 ty_ret && not (is_void_type env ty_ret) then
+ if has_std_alignas genv ty then
+ error loc "alignment specified for function '%s'" s;
+ if wrap incomplete_type loc genv ty_ret && not (is_void_type genv ty_ret) then
fatal_error loc "incomplete result type %a in function definition"
- (print_typ env) ty_ret;
+ (print_typ genv) ty_ret;
(ty_ret, params, vararg, attr)
| _ -> fatal_error loc "wrong type for function definition" in
- (* Enter function in the environment, for recursive references *)
- let (fun_id, sto1, env1, _, _) =
- enter_or_refine_ident false loc env1 s sto ty in
- let incomplete_param env ty =
+ (* Enter function in the global environment *)
+ let (fun_id, sto1, genv, new_ty, _) =
+ enter_or_refine_function loc genv fun_id sto ty in
+ add_global_define loc s;
+ (* Also enter it in the local environment, for recursive references *)
+ let lenv = Env.add_ident lenv fun_id sto new_ty in
+ (* Take into account attributes from previous declarations of the function *)
+ let attr = attributes_of_type genv new_ty in
+ (* Additional checks on function parameters. They should have a complete type
+ and additionally they should have an identifier. In both cases a fatal
+ error is raised in order to avoid problems at later places. *)
+ let add_param env (id, ty) =
if wrap incomplete_type loc env ty then
- fatal_error loc "parameter has incomplete type" in
- (* Enter parameters and extra declarations in the environment *)
- let env2 =
- List.fold_left (fun e (id, ty) -> incomplete_param e ty;
- Env.add_ident e id Storage_default ty)
- (Env.new_scope env1) params in
- let env2 =
+ fatal_error loc "parameter has incomplete type";
+ if id.C.name = "" then
+ fatal_error loc "parameter name omitted";
+ Env.add_ident env id Storage_default ty
+ in
+ (* Enter parameters and extra declarations in the local environment.
+ For K&R functions this hasn't been done yet.
+ For prototyped functions this has been done by [elab_fundef_name]
+ already, but some parameter may have been shadowed by the
+ function name, while it should be the other way around, e.g.
+ [int f(int f) { return f+1; }], with [f] refering to the
+ parameter [f] and not to the function [f] within the body of the
+ function. *)
+ let lenv =
+ List.fold_left add_param lenv params in
+ let lenv =
List.fold_left (fun e (sto, id, ty, init) -> Env.add_ident e id sto ty)
- env2 extra_decls in
- (* Define "__func__" and enter it in the environment *)
+ lenv extra_decls in
+ (* Define "__func__" and enter it in the local environment *)
let (func_ty, func_init) = __func__type_and_init s in
- let (func_id, _, env3, func_ty, _) =
- enter_or_refine_ident true loc env2 "__func__" Storage_static func_ty in
- emit_elab ~debuginfo:false env3 loc
+ let (func_id, _, lenv, func_ty, _) =
+ enter_or_refine_ident true loc lenv "__func__" Storage_static func_ty in
+ emit_elab ~debuginfo:false lenv loc
(Gdecl(Storage_static, func_id, func_ty, Some func_init));
(* Elaborate function body *)
- let body1 = !elab_funbody_f ty_ret vararg env3 body in
+ let body1 = !elab_funbody_f ty_ret vararg (inline && sto <> Storage_static)
+ lenv body in
(* Analyse it for returns *)
- let (can_return, can_fallthrough) = Cflow.function_returns env3 body1 in
+ let (can_return, can_fallthrough) = Cflow.function_returns lenv body1 in
(* Special treatment of the "main" function. *)
let body2 =
if s = "main" then begin
@@ -2365,7 +2658,7 @@ let elab_fundef env spec name defs body loc =
error loc "'main' is not allowed to be declared inline";
if noret then
warning loc Unnamed "'main' is not allowed to be declared _Noreturn";
- match unroll env ty_ret with
+ match unroll genv ty_ret with
| TInt(IInt, []) ->
(* Add implicit "return 0;" at end of function body.
If we trusted the return analysis, we would do this only if
@@ -2378,7 +2671,7 @@ let elab_fundef env spec name defs body loc =
end else begin
(* For non-"main" functions, warn if the body can fall through
and the return type is not "void". *)
- if can_fallthrough && not (is_void_type env ty_ret) then
+ if can_fallthrough && not (is_void_type genv ty_ret) then
warning loc Return_type "control reaches end of non-void function";
body1
end in
@@ -2407,12 +2700,13 @@ let elab_fundef env spec name defs body loc =
fd_vararg = vararg;
fd_locals = [];
fd_body = body3 } in
- emit_elab ~linkage:true env1 loc (Gfundef fn);
- env1
+ emit_elab ~linkage:true genv loc (Gfundef fn);
+ genv
(* Definitions *)
-let rec elab_definition (local: bool) (env: Env.t) (def: Cabs.definition)
+let elab_definition (for_loop: bool) (local: bool) (nonstatic_inline: bool)
+ (env: Env.t) (def: Cabs.definition)
: decl list * Env.t =
match def with
(* "int f(int x) { ... }" *)
@@ -2425,44 +2719,32 @@ let rec elab_definition (local: bool) (env: Env.t) (def: Cabs.definition)
(* "int x = 12, y[10], *z" *)
| DECDEF(init_name_group, loc) ->
let ((dl, env1), sto, tydef) =
- elab_init_name_group false loc env init_name_group in
+ elab_init_name_group loc env init_name_group in
+ if for_loop then begin
+ let fun_declaration = List.exists (fun (_, ty, _) -> is_function_type env ty) dl in
+ if fun_declaration || sto = Storage_extern || sto = Storage_static || tydef then
+ error loc "declaration of non-local variable in 'for' loop" ;
+ end;
if tydef then
let env2 = enter_typedefs loc env1 sto dl
in ([], env2)
else
- enter_decdefs local loc env1 sto dl
+ enter_decdefs local nonstatic_inline loc env1 sto dl
(* pragma *)
| PRAGMA(s, loc) ->
emit_elab env loc (Gpragma s);
([], env)
-and elab_definitions local env = function
- | [] -> ([], env)
- | d1 :: dl ->
- let (decl1, env1) = elab_definition local env d1 in
- let (decl2, env2) = elab_definitions local env1 dl in
- (decl1 @ decl2, env2)
-
(* Extended asm *)
-let elab_asm_operand vararg loc env (ASMOPERAND(label, wide, chars, e)) =
+let elab_asm_operand ctx loc env (ASMOPERAND(label, wide, chars, e)) =
let s = elab_simple_string loc wide chars in
- let e',env = elab_expr vararg loc env e in
+ let e',env = elab_expr ctx loc env e in
(label, s, e'),env
-(* Contexts for elaborating statements *)
-
-module StringSet = Set.Make(String)
-
-type stmt_context = {
- ctx_return_typ: typ; (**r return type for the function *)
- ctx_labels: StringSet.t; (**r all labels defined in the function *)
- ctx_break: bool; (**r is 'break' allowed? *)
- ctx_continue: bool; (**r is 'continue' allowed? *)
- ctx_vararg: bool; (**r is this a vararg function? *)
-}
+(* Operations over contexts *)
let stmt_labels stmt =
let lbls = ref StringSet.empty in
@@ -2487,7 +2769,48 @@ let stmt_labels stmt =
let ctx_loop ctx = { ctx with ctx_break = true; ctx_continue = true }
-let ctx_switch ctx = { ctx with ctx_break = true }
+let ctx_switch ctx = { ctx with ctx_break = true; ctx_in_switch = true }
+
+(* Check the uniqueness of 'case' and 'default' in a 'switch' *)
+
+module Int64Set = Set.Make(Int64)
+
+let check_switch_cases switch_body =
+ let cases = ref Int64Set.empty
+ and default = ref false in
+ let rec check s =
+ match s.sdesc with
+ | Sskip -> ()
+ | Sdo _ -> ()
+ | Sseq(s1, s2) -> check s1; check s2
+ | Sif(_, s1, s2) -> check s1; check s2
+ | Swhile(_, s1) -> check s1
+ | Sdowhile(s1, _) -> check s1
+ | Sfor(s1, _, s2, s3) -> check s1; check s2; check s3
+ | Sbreak -> ()
+ | Scontinue -> ()
+ | Sswitch(_, _) -> () (* already checked during elaboration of this switch *)
+ | Slabeled(lbl, s1) ->
+ begin match lbl with
+ | Slabel _ -> ()
+ | Scase(_, n) ->
+ if Int64Set.mem n !cases then
+ Diagnostics.error s.sloc "duplicate case value '%Ld'" n
+ else
+ cases := Int64Set.add n !cases
+ | Sdefault ->
+ if !default then
+ Diagnostics.error s.sloc "multiple default labels in one switch"
+ else
+ default := true
+ end;
+ check s1
+ | Sgoto _ -> ()
+ | Sreturn _ -> ()
+ | Sblock sl -> List.iter check sl
+ | Sdecl _ -> ()
+ | Sasm _ -> ()
+ in check switch_body
(* Elaboration of statements *)
@@ -2498,7 +2821,7 @@ let rec elab_stmt env ctx s =
(* 6.8.3 Expression statements *)
| COMPUTATION(a, loc) ->
- let a,env = (elab_expr ctx.ctx_vararg loc env a) in
+ let a,env = elab_expr ctx loc env a in
{ sdesc = Sdo a; sloc = elab_loc loc },env
(* 6.8.1 Labeled statements *)
@@ -2508,16 +2831,20 @@ let rec elab_stmt env ctx s =
{ sdesc = Slabeled(Slabel lbl, s1); sloc = elab_loc loc },env
| CASE(a, s1, loc) ->
- let a',env = elab_expr ctx.ctx_vararg loc env a in
- begin match Ceval.integer_expr env a' with
+ if not ctx.ctx_in_switch then
+ error loc "'case' statement not in switch statement";
+ let a',env = elab_expr ctx loc env a in
+ let n =
+ match Ceval.integer_expr env a' with
| None ->
- error loc "expression of 'case' label is not an integer constant expression"
- | Some n -> ()
- end;
+ error loc "expression of 'case' label is not an integer constant expression"; 0L
+ | Some n -> n in
let s1,env = elab_stmt env ctx s1 in
- { sdesc = Slabeled(Scase a', s1); sloc = elab_loc loc },env
+ { sdesc = Slabeled(Scase(a', n), s1); sloc = elab_loc loc },env
| DEFAULT(s1, loc) ->
+ if not ctx.ctx_in_switch then
+ error loc "'case' statement not in switch statement";
let s1,env = elab_stmt env ctx s1 in
{ sdesc = Slabeled(Sdefault, s1); sloc = elab_loc loc },env
@@ -2529,7 +2856,7 @@ let rec elab_stmt env ctx s =
(* 6.8.4 Conditional statements *)
| If(a, s1, s2, loc) ->
- let a',env = elab_expr ctx.ctx_vararg loc env a in
+ let a',env = elab_expr ctx loc env a in
if not (is_scalar_type env a'.etyp) then
error loc "controlling expression of 'if' does not have scalar type (%a invalid)"
(print_typ env) a'.etyp;
@@ -2544,7 +2871,7 @@ let rec elab_stmt env ctx s =
(* 6.8.5 Iterative statements *)
| WHILE(a, s1, loc) ->
- let a',env = elab_expr ctx.ctx_vararg loc env a in
+ let a',env = elab_expr ctx loc env a in
if not (is_scalar_type env a'.etyp) then
error loc "controlling expression of 'while' does not have scalar type (%a invalid)"
(print_typ env) a'.etyp;
@@ -2553,7 +2880,7 @@ let rec elab_stmt env ctx s =
| DOWHILE(a, s1, loc) ->
let s1',env = elab_stmt env (ctx_loop ctx) s1 in
- let a',env = elab_expr ctx.ctx_vararg loc env a in
+ let a',env = elab_expr ctx loc env a in
if not (is_scalar_type env a'.etyp) then
error loc "controlling expression of 'while' does not have scalar type (%a invalid)"
(print_typ env) a'.etyp;
@@ -2563,24 +2890,25 @@ let rec elab_stmt env ctx s =
let (a1', env_decls, decls') =
match fc with
| Some (FC_EXP a1) ->
- let a1,env = elab_for_expr ctx.ctx_vararg loc env (Some a1) in
+ let a1,env = elab_for_expr ctx loc env (Some a1) in
(a1, env, None)
| None ->
- let a1,env = elab_for_expr ctx.ctx_vararg loc env None in
+ let a1,env = elab_for_expr ctx loc env None in
(a1, env, None)
| Some (FC_DECL def) ->
- let (dcl, env') = elab_definition true (Env.new_scope env) def in
+ let (dcl, env') = elab_definition true true ctx.ctx_nonstatic_inline
+ (Env.new_scope env) def in
let loc = elab_loc (Cabshelper.get_definitionloc def) in
(sskip, env',
Some(List.map (fun d -> {sdesc = Sdecl d; sloc = loc}) dcl)) in
let a2',env_test =
match a2 with
| None -> intconst 1L IInt,env_decls
- | Some a2 -> elab_expr ctx.ctx_vararg loc env_decls a2
+ | Some a2 -> elab_expr ctx loc env_decls a2
in
if not (is_scalar_type env_test a2'.etyp) then
error loc "controlling expression of 'for' does not have scalar type (%a invalid)" (print_typ env) a2'.etyp;
- let a3',env_for = elab_for_expr ctx.ctx_vararg loc env_test a3 in
+ let a3',env_for = elab_for_expr ctx loc env_test a3 in
let s1',env_body = elab_stmt env_for (ctx_loop ctx) s1 in
let sfor = { sdesc = Sfor(a1', a2', a3', s1'); sloc = elab_loc loc } in
begin match decls' with
@@ -2590,11 +2918,12 @@ let rec elab_stmt env ctx s =
(* 6.8.4 Switch statement *)
| SWITCH(a, s1, loc) ->
- let a',env = elab_expr ctx.ctx_vararg loc env a in
+ let a',env = elab_expr ctx loc env a in
if not (is_integer_type env a'.etyp) then
error loc "controlling expression of 'switch' does not have integer type (%a invalid)"
(print_typ env) a'.etyp;
let s1',env = elab_stmt env (ctx_switch ctx) s1 in
+ check_switch_cases s1';
{ sdesc = Sswitch(a', s1'); sloc = elab_loc loc },env
(* 6.8.6 Break and continue statements *)
@@ -2609,7 +2938,7 @@ let rec elab_stmt env ctx s =
(* 6.8.6 Return statements *)
| RETURN(a, loc) ->
- let a',env = elab_opt_expr ctx.ctx_vararg loc env a in
+ let a',env = elab_opt_expr ctx loc env a in
begin match (unroll env ctx.ctx_return_typ, a') with
| TVoid _, None -> ()
| TVoid _, Some _ ->
@@ -2628,7 +2957,7 @@ let rec elab_stmt env ctx s =
(print_typ env) b.etyp (print_typ env) ctx.ctx_return_typ
else
warning loc Unnamed
- "incompatible conversion returning %a from a function with result type %a"
+ "incompatible conversion: returning %a from a function with result type %a"
(print_typ env) b.etyp (print_typ env) ctx.ctx_return_typ
else
error loc
@@ -2652,8 +2981,13 @@ let rec elab_stmt env ctx s =
| ASM(cv_specs, wide, chars, outputs, inputs, flags, loc) ->
let a = elab_cvspecs env cv_specs in
let s = elab_simple_string loc wide chars in
- let outputs,env = mmap (elab_asm_operand ctx.ctx_vararg loc) env outputs in
- let inputs ,env= mmap (elab_asm_operand ctx.ctx_vararg loc) env inputs in
+ let outputs,env = mmap (elab_asm_operand ctx loc) env outputs in
+ List.iter
+ (fun (lbl, cst, e) ->
+ if not (is_modifiable_lvalue env e) then
+ error loc "asm output is not a modifiable l-value";)
+ outputs;
+ let inputs ,env= mmap (elab_asm_operand ctx loc) env inputs in
let flags = List.map (fun (w,c) -> elab_simple_string loc w c) flags in
{ sdesc = Sasm(a, s, outputs, inputs, flags);
sloc = elab_loc loc },env
@@ -2672,7 +3006,8 @@ and elab_block_body env ctx sl =
| [] ->
[],env
| DEFINITION def :: sl1 ->
- let (dcl, env') = elab_definition true env def in
+ let (dcl, env') =
+ elab_definition false true ctx.ctx_nonstatic_inline env def in
let loc = elab_loc (Cabshelper.get_definitionloc def) in
let dcl = List.map (fun ((sto,id,ty,_) as d) ->
Debug.insert_local_declaration sto id ty loc;
@@ -2686,14 +3021,24 @@ and elab_block_body env ctx sl =
(* Elaboration of a function body. Return the corresponding C statement. *)
-let elab_funbody return_typ vararg env b =
+let elab_funbody return_typ vararg nonstatic_inline env b =
let ctx =
{ ctx_return_typ = return_typ;
ctx_labels = stmt_labels b;
ctx_break = false;
ctx_continue = false;
- ctx_vararg = vararg;} in
- fst(elab_stmt env ctx b)
+ ctx_in_switch = false;
+ ctx_vararg = vararg;
+ ctx_nonstatic_inline = nonstatic_inline } in
+ (* The function body appears as a block in the AST but should not create
+ a new scope. Instead, the scope used for function parameters must be
+ used for the body. *)
+ match b with
+ | BLOCK (b,loc) ->
+ let b',_ = elab_block_body env ctx b in
+ { sdesc = Sblock b'; sloc = elab_loc loc }
+ | _ ->
+ assert false
(* Filling in forward declaration *)
let _ = elab_funbody_f := elab_funbody
@@ -2703,7 +3048,9 @@ let _ = elab_funbody_f := elab_funbody
let elab_file prog =
reset();
- ignore (elab_definitions false (Builtins.environment()) prog);
+ let env = Builtins.environment () in
+ let elab_def env d = snd (elab_definition false false false env d) in
+ ignore (List.fold_left elab_def env prog);
let p = elaborated_program () in
Checks.unused_variables p;
Checks.unknown_attrs_program p;
diff --git a/cparser/ExtendedAsm.ml b/cparser/ExtendedAsm.ml
index 6cd95aec..257e9cf7 100644
--- a/cparser/ExtendedAsm.ml
+++ b/cparser/ExtendedAsm.ml
@@ -73,7 +73,7 @@ let set_label_const lbl pos n subst =
let is_reg_pair env ty =
match unroll env ty with
- | TInt(ik, _) -> sizeof_ikind ik > !config.sizeof_ptr
+ | TInt(ik, _) -> sizeof_ikind ik > !config.sizeof_intreg
| _ -> false
(* Transform the input operands:
@@ -126,8 +126,6 @@ let transf_outputs loc env = function
| [] ->
(None, [], StringMap.empty, 0, 0)
| [(lbl, cstr, e)] ->
- if not (is_modifiable_lvalue env e) then
- error loc "asm output is not a modifiable l-value";
let valid = Str.string_match re_valid_output cstr 0 in
if valid && String.contains cstr 'r' then
if is_reg_pair env e.etyp then
diff --git a/cparser/GNUmakefile b/cparser/GNUmakefile
index a2646c7b..ce326463 100644
--- a/cparser/GNUmakefile
+++ b/cparser/GNUmakefile
@@ -164,11 +164,11 @@ concrete: $(DATABASE).raw deLexer
# We declare a type name "t", which the de-lexer uses as a type name.
@ f=0 ; \
while read -r line ; do \
- filename=`printf "tests/generated/%03d.c" $$f` ; \
+ filename=`printf "tests/generated/parser_%03d.c" $$f` ; \
rm -f $$filename ; \
echo "typedef int t;" >> $$filename ; \
echo "$$line" \
- | $(CUT) --fields="1" --delimiter=" " --complement \
+ | $(CUT) -f 2- -d " " \
| ./deLexer \
>> $$filename ; \
f=$$((f+1)) ; \
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index cf8788c5..b2a668f0 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -21,7 +21,7 @@ open Pre_parser_aux
module SSet = Set.Make(String)
let lexicon : (string, Cabs.cabsloc -> token) Hashtbl.t = Hashtbl.create 17
-let ignored_keyworkds : SSet.t ref = ref SSet.empty
+let ignored_keywords : SSet.t ref = ref SSet.empty
let () =
List.iter (fun (key, builder) -> Hashtbl.add lexicon key builder)
@@ -85,7 +85,7 @@ let () =
("while", fun loc -> WHILE loc)];
if Configuration.system <> "diab" then
(* We can ignore the __extension__ GCC keyword. *)
- ignored_keyworkds := SSet.add "__extension__" !ignored_keyworkds
+ ignored_keywords := SSet.add "__extension__" !ignored_keywords
let init_ctx = SSet.singleton "__builtin_va_list"
let types_context : SSet.t ref = ref init_ctx
@@ -135,7 +135,7 @@ let error lb fmt =
let warning lb fmt =
Diagnostics.warning
- (lb.lex_curr_p.pos_fname,lb.lex_curr_p.pos_lnum) Diagnostics.Unnamed ("warning: " ^^ fmt)
+ (lb.lex_curr_p.pos_fname,lb.lex_curr_p.pos_lnum) Diagnostics.Unnamed fmt
(* Simple character escapes *)
@@ -329,7 +329,7 @@ rule initial = parse
| "," { COMMA(currentLoc lexbuf) }
| "." { DOT(currentLoc lexbuf) }
| identifier as id {
- if SSet.mem id !ignored_keyworkds then
+ if SSet.mem id !ignored_keywords then
initial lexbuf
else
try Hashtbl.find lexicon id (currentLoc lexbuf)
diff --git a/cparser/Machine.ml b/cparser/Machine.ml
index bd524cf8..28c6f8a6 100644
--- a/cparser/Machine.ml
+++ b/cparser/Machine.ml
@@ -44,6 +44,7 @@ type t = {
wchar_signed: bool;
sizeof_size_t: int;
sizeof_ptrdiff_t: int;
+ sizeof_intreg: int;
alignof_ptr: int;
alignof_short: int;
alignof_int: int;
@@ -78,6 +79,7 @@ let ilp32ll64 = {
wchar_signed = true;
sizeof_size_t = 4;
sizeof_ptrdiff_t = 4;
+ sizeof_intreg = 4;
alignof_ptr = 4;
alignof_short = 2;
alignof_int = 4;
@@ -112,6 +114,7 @@ let i32lpll64 = {
wchar_signed = true;
sizeof_size_t = 8;
sizeof_ptrdiff_t = 8;
+ sizeof_intreg = 8;
alignof_ptr = 8;
alignof_short = 2;
alignof_int = 4;
@@ -146,6 +149,7 @@ let il32pll64 = {
wchar_signed = true;
sizeof_size_t = 8;
sizeof_ptrdiff_t = 8;
+ sizeof_intreg = 8;
alignof_ptr = 8;
alignof_short = 2;
alignof_int = 4;
@@ -202,11 +206,20 @@ let ppc_32_bigendian =
struct_passing_style = SP_ref_caller;
struct_return_style = SR_int1to8; }
+let ppc_32_r64_bigendian =
+ { ppc_32_bigendian with sizeof_intreg = 8;}
+
let ppc_32_diab_bigendian =
{ ppc_32_bigendian with sizeof_wchar = 2; wchar_signed = false }
+let ppc_32_r64_diab_bigendian =
+ { ppc_32_diab_bigendian with sizeof_intreg = 8;}
+
let ppc_32_linux_bigendian = {ppc_32_bigendian with struct_return_style = SR_ref;}
+let ppc_32_r64_linux_bigendian =
+ { ppc_32_linux_bigendian with sizeof_intreg = 8;}
+
let arm_littleendian =
{ ilp32ll64 with name = "arm"; struct_passing_style = SP_split_args;
struct_return_style = SR_int1to4;}
@@ -260,6 +273,7 @@ let undef = {
wchar_signed = true;
sizeof_size_t = 0;
sizeof_ptrdiff_t = 0;
+ sizeof_intreg = 0;
alignof_ptr = 0;
alignof_short = 0;
alignof_int = 0;
diff --git a/cparser/Machine.mli b/cparser/Machine.mli
index 32f9a4de..56d8d0b9 100644
--- a/cparser/Machine.mli
+++ b/cparser/Machine.mli
@@ -43,6 +43,7 @@ type t = {
wchar_signed: bool;
sizeof_size_t: int;
sizeof_ptrdiff_t: int;
+ sizeof_intreg: int;
alignof_ptr: int;
alignof_short: int;
alignof_int: int;
@@ -78,6 +79,9 @@ val win64 : t
val ppc_32_bigendian : t
val ppc_32_diab_bigendian : t
val ppc_32_linux_bigendian : t
+val ppc_32_r64_bigendian : t
+val ppc_32_r64_diab_bigendian : t
+val ppc_32_r64_linux_bigendian : t
val arm_littleendian : t
val arm_bigendian : t
val rv32 : t
diff --git a/cparser/validator/Alphabet.v b/cparser/MenhirLib/Alphabet.v
index a13f69b0..a13f69b0 100644
--- a/cparser/validator/Alphabet.v
+++ b/cparser/MenhirLib/Alphabet.v
diff --git a/cparser/validator/Automaton.v b/cparser/MenhirLib/Automaton.v
index fc995298..fc995298 100644
--- a/cparser/validator/Automaton.v
+++ b/cparser/MenhirLib/Automaton.v
diff --git a/cparser/validator/Grammar.v b/cparser/MenhirLib/Grammar.v
index 8e427cd9..8e427cd9 100644
--- a/cparser/validator/Grammar.v
+++ b/cparser/MenhirLib/Grammar.v
diff --git a/cparser/validator/Interpreter.v b/cparser/MenhirLib/Interpreter.v
index 4ac02693..4ac02693 100644
--- a/cparser/validator/Interpreter.v
+++ b/cparser/MenhirLib/Interpreter.v
diff --git a/cparser/validator/Interpreter_complete.v b/cparser/MenhirLib/Interpreter_complete.v
index f76731d5..2e64b8da 100644
--- a/cparser/validator/Interpreter_complete.v
+++ b/cparser/MenhirLib/Interpreter_complete.v
@@ -220,7 +220,7 @@ Lemma ptlz_past_ptlz_prod:
(ptlz:ptl_zipper hole_symbs hole_word hole_sems),
rev_append hole_symbs (ptlz_past ptlz) = prod_rhs_rev (ptlz_prod ptlz).
Proof.
-fix 4.
+fix ptlz_past_ptlz_prod 4.
destruct ptlz; simpl.
rewrite <- rev_alt, rev_involutive; reflexivity.
apply (ptlz_past_ptlz_prod _ _ _ ptlz).
@@ -298,7 +298,7 @@ Lemma build_pt_dot_cost:
(ptlz:ptl_zipper hole_symbs hole_word hole_sems),
ptd_cost (build_pt_dot ptl ptlz) = ptl_size ptl + ptlz_cost ptlz.
Proof.
-fix 4.
+fix build_pt_dot_cost 4.
destruct ptl; intros.
reflexivity.
destruct p.
@@ -313,7 +313,7 @@ Lemma build_pt_dot_buffer:
(ptlz:ptl_zipper hole_symbs hole_word hole_sems),
ptd_buffer (build_pt_dot ptl ptlz) = hole_word ++ ptlz_buffer ptlz.
Proof.
-fix 4.
+fix build_pt_dot_buffer 4.
destruct ptl; intros.
reflexivity.
destruct p.
@@ -330,7 +330,7 @@ Lemma ptd_stack_compat_build_pt_dot:
ptlz_stack_compat ptlz stack ->
ptd_stack_compat (build_pt_dot ptl ptlz) stack.
Proof.
-fix 4.
+fix ptd_stack_compat_build_pt_dot 4.
destruct ptl; intros.
eauto.
destruct p.
@@ -375,7 +375,7 @@ Lemma pop_ptlz_cost:
let 'existT _ word (existT _ sem (ptz, pt)) := pop_ptlz ptl ptlz in
ptlz_cost ptlz = ptz_cost ptz.
Proof.
-fix 5.
+fix pop_ptlz_cost 5.
destruct ptlz.
reflexivity.
simpl; apply pop_ptlz_cost.
@@ -388,7 +388,7 @@ Lemma pop_ptlz_buffer:
let 'existT _ word (existT _ sem (ptz, pt)) := pop_ptlz ptl ptlz in
ptlz_buffer ptlz = ptz_buffer ptz.
Proof.
-fix 5.
+fix pop_ptlz_buffer 5.
destruct ptlz.
reflexivity.
simpl; apply pop_ptlz_buffer.
@@ -428,7 +428,7 @@ Lemma pop_ptlz_pop_stack_compat:
end.
Proof.
Opaque AlphabetComparable AlphabetComparableUsualEq.
-fix 5.
+fix pop_ptlz_pop_stack_compat 5.
destruct ptlz. intros; simpl.
split.
apply H.
@@ -591,7 +591,7 @@ Lemma parse_fix_complete:
| Err => True
end.
Proof.
-fix 3.
+fix parse_fix_complete 3.
destruct n_steps; intros; simpl.
apply Nat.lt_0_succ.
apply step_next_ptd in H.
diff --git a/cparser/validator/Interpreter_correct.v b/cparser/MenhirLib/Interpreter_correct.v
index 1263d4e3..1263d4e3 100644
--- a/cparser/validator/Interpreter_correct.v
+++ b/cparser/MenhirLib/Interpreter_correct.v
diff --git a/cparser/validator/Interpreter_safe.v b/cparser/MenhirLib/Interpreter_safe.v
index a1aa35b8..a1aa35b8 100644
--- a/cparser/validator/Interpreter_safe.v
+++ b/cparser/MenhirLib/Interpreter_safe.v
diff --git a/cparser/validator/Main.v b/cparser/MenhirLib/Main.v
index 1a17e988..1a17e988 100644
--- a/cparser/validator/Main.v
+++ b/cparser/MenhirLib/Main.v
diff --git a/cparser/validator/Tuples.v b/cparser/MenhirLib/Tuples.v
index 3fd2ec03..3fd2ec03 100644
--- a/cparser/validator/Tuples.v
+++ b/cparser/MenhirLib/Tuples.v
diff --git a/cparser/validator/Validator_complete.v b/cparser/MenhirLib/Validator_complete.v
index a9823278..a9823278 100644
--- a/cparser/validator/Validator_complete.v
+++ b/cparser/MenhirLib/Validator_complete.v
diff --git a/cparser/validator/Validator_safe.v b/cparser/MenhirLib/Validator_safe.v
index 183d661b..183d661b 100644
--- a/cparser/validator/Validator_safe.v
+++ b/cparser/MenhirLib/Validator_safe.v
diff --git a/cparser/PackedStructs.ml b/cparser/PackedStructs.ml
index e1287eb8..a2c91c0a 100644
--- a/cparser/PackedStructs.ml
+++ b/cparser/PackedStructs.ml
@@ -81,47 +81,33 @@ let transf_field_decl mfa swapped loc env struct_id f =
(* Rewriting struct declarations *)
let transf_struct_decl mfa msa swapped loc env struct_id attrs ml =
+ let attrs' =
+ remove_custom_attributes ["packed";"__packed__"] attrs in
let ml' =
List.map (transf_field_decl mfa swapped loc env struct_id) ml in
- if msa = 0 then (attrs, ml') else begin
- let al' = (* natural alignment of the transformed struct *)
- List.fold_left
- (fun a f' -> max a (safe_alignof loc env f'.fld_typ))
- 1 ml' in
- (set_alignas_attr (max msa al') attrs, ml')
+ if msa = 0 then (attrs', ml') else begin
+ (* [Cutil.composite_info_def] takes packing parameters into account.
+ Hence the alignment it returns is the correct alignment for
+ the transformed struct. *)
+ let ci = Cutil.composite_info_def env Struct attrs ml in
+ match ci.ci_alignof with
+ | None -> error loc "incomplete struct"; (attrs', ml')
+ | Some al -> (set_alignas_attr al attrs', ml')
end
(* Rewriting composite declarations *)
-let is_pow2 n = n > 0 && n land (n - 1) = 0
-
-let packed_param_value loc n =
- let m = Int64.to_int n in
- if n <> Int64.of_int m then
- (error loc "__packed__ parameter `%Ld' is too large" n; 0)
- else if m = 0 || is_pow2 m then
- m
- else
- (error loc "__packed__ parameter `%Ld' must be a power of 2" n; 0)
-
let transf_composite loc env su id attrs ml =
match su with
| Union -> (attrs, ml)
| Struct ->
let (mfa, msa, swapped) =
match find_custom_attributes ["packed";"__packed__"] attrs with
- | [] -> (0L, 0L, false)
- | [[]] -> (1L, 0L, false)
- | [[AInt n]] -> (n, 0L, false)
- | [[AInt n; AInt p]] -> (n, p, false)
- | [[AInt n; AInt p; AInt q]] -> (n, p, q <> 0L)
- | _ ->
- error loc "ill-formed or ambiguous __packed__ attribute";
- (0L, 0L, false) in
- let mfa = packed_param_value loc mfa in
- let msa = packed_param_value loc msa in
- let attrs' = remove_custom_attributes ["packed";"__packed__"] attrs in
- transf_struct_decl mfa msa swapped loc env id attrs' ml
+ | [] -> (0, 0, false)
+ | [_] -> Cutil.packing_parameters attrs
+ | _ -> error loc "multiple __packed__ attributes";
+ (0, 0, false) in
+ transf_struct_decl mfa msa swapped loc env id attrs ml
(* Accessor functions *)
diff --git a/cparser/Parse.ml b/cparser/Parse.ml
index b2c83698..154e3dcf 100644
--- a/cparser/Parse.ml
+++ b/cparser/Parse.ml
@@ -69,7 +69,7 @@ let preprocessed_file transfs name sourcefile =
| Parser.Parser.Inter.Fail_pr ->
(* Theoretically impossible : implies inconsistencies
between grammars. *)
- Diagnostics.fatal_error Diagnostics.no_loc "Internal error while parsing"
+ Diagnostics.fatal_error Diagnostics.no_loc "internal error while parsing"
| Parser.Parser.Inter.Timeout_pr -> assert false
| Parser.Parser.Inter.Parsed_pr (ast, _ ) -> ast) in
let p1 = Timing.time "Elaboration" Elab.elab_file ast in
diff --git a/cparser/Parser.vy b/cparser/Parser.vy
index 7fe686f1..79e3793d 100644
--- a/cparser/Parser.vy
+++ b/cparser/Parser.vy
@@ -172,10 +172,8 @@ unary_expression:
| loc = SIZEOF LPAREN typ = type_name RPAREN
{ (TYPE_SIZEOF typ, loc) }
(* Non-standard *)
-| loc = ALIGNOF expr = unary_expression
- { (EXPR_ALIGNOF (fst expr), loc) }
| loc = ALIGNOF LPAREN typ = type_name RPAREN
- { (TYPE_ALIGNOF typ, loc) }
+ { (ALIGNOF typ, loc) }
unary_operator:
| loc = AND
@@ -546,7 +544,7 @@ attribute_specifier:
| loc = ALIGNAS LPAREN args = argument_expression_list RPAREN
{ (ALIGNAS_ATTR (rev' args) loc, loc) }
| loc = ALIGNAS LPAREN typ = type_name RPAREN
- { (ALIGNAS_ATTR [TYPE_ALIGNOF typ] loc, loc) }
+ { (ALIGNAS_ATTR [ALIGNOF typ] loc, loc) }
gcc_attribute_list:
| a = gcc_attribute
@@ -562,7 +560,7 @@ gcc_attribute:
| w = gcc_attribute_word LPAREN RPAREN
{ GCC_ATTR_ARGS w [] }
| w = gcc_attribute_word LPAREN args = argument_expression_list RPAREN
- { GCC_ATTR_ARGS w args }
+ { GCC_ATTR_ARGS w (rev' args) }
gcc_attribute_word:
| i = OTHER_NAME
diff --git a/cparser/Rename.ml b/cparser/Rename.ml
index d63fa47d..eb31eaf0 100644
--- a/cparser/Rename.ml
+++ b/cparser/Rename.ml
@@ -188,7 +188,7 @@ and stmt_or_decl env s =
(stmt env s, env)
and slabel env = function
- | Scase e -> Scase(exp env e)
+ | Scase(e, n) -> Scase(exp env e, n)
| sl -> sl
let fundef env f =
diff --git a/cparser/Unblock.ml b/cparser/Unblock.ml
index 5df2e2cf..da8049a5 100644
--- a/cparser/Unblock.ml
+++ b/cparser/Unblock.ml
@@ -31,7 +31,7 @@ let rec local_initializer env path init k =
let (ty_elt, sz) =
match unroll env path.etyp with
| TArray(ty_elt, Some sz, _) -> (ty_elt, sz)
- | _ -> Diagnostics.fatal_error Diagnostics.no_loc "Wrong type for array initializer" in
+ | _ -> Diagnostics.fatal_error Diagnostics.no_loc "wrong type for array initializer" in
let rec array_init pos il =
if pos >= sz then k else begin
let (i1, il') =
diff --git a/cparser/deLexer.ml b/cparser/deLexer.ml
index 3aa168da..de0e9b6e 100644
--- a/cparser/deLexer.ml
+++ b/cparser/deLexer.ml
@@ -115,6 +115,7 @@ let delex (symbol : string) : string =
| "COMMA" -> ","
| "DOT" -> "."
| "PRAGMA" -> "#pragma \n"
+ | "BUILTIN_OFFSETOF" -> "__builtin_offsetof"
| "EOF" -> "" (* this should be ok *)
| _ -> raise Not_found (* this should not happen *)
diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages
index 567fdd6b..95077739 100644
--- a/cparser/handcrafted.messages
+++ b/cparser/handcrafted.messages
@@ -181,7 +181,7 @@
translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 341.
+## Ends in an error in state: 314.
##
## attribute_specifier -> ALIGNAS LPAREN type_name . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
@@ -192,9 +192,9 @@ translation_unit_file: ALIGNAS LPAREN INT XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# Maybe the type name was not complete, but we have reduced anyway
@@ -216,7 +216,6 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN
##
## Ends in an error in state: 304.
##
-## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## unary_expression -> ALIGNOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
@@ -226,13 +225,13 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN VOID XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 389.
+## Ends in an error in state: 388.
##
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## unary_expression -> SIZEOF LPAREN type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -244,9 +243,9 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF LPAREN VOID XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed use of $2.
@@ -259,7 +258,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA VOID XOR_ASSIGN
##
-## Ends in an error in state: 353.
+## Ends in an error in state: 333.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA type_name . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -270,9 +269,9 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME V
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed use of __builtin_va_arg.
@@ -285,7 +284,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 383.
+## Ends in an error in state: 363.
##
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -296,9 +295,9 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN VOID XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# gcc simply says it expects a closing parenthesis,
@@ -314,7 +313,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 386.
+## Ends in an error in state: 385.
##
## cast_expression -> LPAREN type_name . RPAREN cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> LPAREN type_name . RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -326,9 +325,9 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN VOID XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
# gcc and clang say they expect a closing parenthesis.
@@ -342,7 +341,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 343.
+## Ends in an error in state: 316.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## attribute_specifier -> ALIGNAS LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
@@ -354,21 +353,21 @@ translation_unit_file: ALIGNAS LPAREN PRE_NAME VAR_NAME SEMICOLON
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 143, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
##
# We are trying to recognize an alignas specifier.
@@ -392,7 +391,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: ALIGNAS LPAREN INT LBRACK RPAREN
##
-## Ends in an error in state: 240.
+## Ends in an error in state: 151.
##
## direct_abstract_declarator -> option(direct_abstract_declarator) LBRACK option(type_qualifier_list) . optional(assignment_expression,RBRACK) [ RPAREN LPAREN LBRACK COMMA ]
## type_qualifier_list -> option(type_qualifier_list) . type_qualifier_noattr [ VOLATILE TILDE STRING_LITERAL STAR SIZEOF RESTRICT RBRACK PRE_NAME PLUS PACKED MINUS LPAREN INC DEC CONSTANT CONST BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG ATTRIBUTE AND ALIGNOF ALIGNAS ]
@@ -514,7 +513,7 @@ At this point, a closing parenthesis ')' is expected.
translation_unit_file: ALIGNAS LPAREN INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 331.
+## Ends in an error in state: 307.
##
## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
@@ -537,7 +536,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 234.
+## Ends in an error in state: 145.
##
## direct_abstract_declarator -> LPAREN . save_context abstract_declarator(type_name) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
## direct_abstract_declarator -> LPAREN . option(context_parameter_type_list) RPAREN [ RPAREN LPAREN LBRACK COMMA ]
@@ -625,7 +624,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: ATTRIBUTE LPAREN LPAREN COMMA XOR_ASSIGN
##
-## Ends in an error in state: 365.
+## Ends in an error in state: 345.
##
## gcc_attribute_list -> gcc_attribute_list COMMA . gcc_attribute [ RPAREN COMMA ]
##
@@ -647,7 +646,7 @@ At this point, a gcc attribute is expected.
translation_unit_file: ATTRIBUTE LPAREN LPAREN RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 363.
+## Ends in an error in state: 343.
##
## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list RPAREN . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
##
@@ -662,7 +661,7 @@ At this point, a second closing parenthesis ')' is expected.
translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 362.
+## Ends in an error in state: 342.
##
## attribute_specifier -> ATTRIBUTE LPAREN LPAREN gcc_attribute_list . RPAREN RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
## gcc_attribute_list -> gcc_attribute_list . COMMA gcc_attribute [ RPAREN COMMA ]
@@ -685,7 +684,7 @@ At this point, one of the following is expected:
translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 358.
+## Ends in an error in state: 338.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA argument_expression_list . RPAREN [ RPAREN COMMA ]
@@ -697,21 +696,21 @@ translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 143, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
##
# We know for sure that we are parsing a gcc attribute.
@@ -729,7 +728,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 357.
+## Ends in an error in state: 337.
##
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name COMMA . argument_expression_list RPAREN [ RPAREN COMMA ]
##
@@ -746,7 +745,7 @@ At this point, an expression is expected.
translation_unit_file: ATTRIBUTE LPAREN LPAREN PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 356.
+## Ends in an error in state: 336.
##
## gcc_attribute -> gcc_attribute_word LPAREN typedef_name . COMMA argument_expression_list RPAREN [ RPAREN COMMA ]
##
@@ -861,7 +860,7 @@ At this point, two opening parentheses '((' are expected.
translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 373.
+## Ends in an error in state: 353.
##
## enumerator_list -> enumerator_list COMMA . declare_varname(enumerator) [ RBRACE COMMA ]
## option(COMMA) -> COMMA . [ RBRACE ]
@@ -882,7 +881,7 @@ At this point, an enumerator is expected.
translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON
##
-## Ends in an error in state: 372.
+## Ends in an error in state: 352.
##
## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE enumerator_list . option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## enumerator_list -> enumerator_list . COMMA declare_varname(enumerator) [ RBRACE COMMA ]
@@ -894,22 +893,22 @@ translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ CONSTANT SEMICOLON
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 67, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 377, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression
-## In state 374, spurious reduction of production declare_varname(enumerator) -> enumerator
-## In state 381, spurious reduction of production enumerator_list -> declare_varname(enumerator)
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 154, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 357, spurious reduction of production enumerator -> enumeration_constant EQ conditional_expression
+## In state 354, spurious reduction of production declare_varname(enumerator) -> enumerator
+## In state 361, spurious reduction of production enumerator_list -> declare_varname(enumerator)
##
#
# At first sight, it seems that the last enumerator that we have recognized
@@ -940,7 +939,7 @@ then at this point, a closing brace '}' is expected.
translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME EQ XOR_ASSIGN
##
-## Ends in an error in state: 376.
+## Ends in an error in state: 356.
##
## enumerator -> enumeration_constant EQ . conditional_expression [ RBRACE COMMA ]
##
@@ -955,7 +954,7 @@ At this point, a constant expression is expected.
translation_unit_file: ENUM LBRACE PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 375.
+## Ends in an error in state: 355.
##
## enumerator -> enumeration_constant . [ RBRACE COMMA ]
## enumerator -> enumeration_constant . EQ conditional_expression [ RBRACE COMMA ]
@@ -976,7 +975,7 @@ At this point, one of the following is expected:
translation_unit_file: ENUM LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 370.
+## Ends in an error in state: 350.
##
## enum_specifier -> ENUM attribute_specifier_list option(other_identifier) LBRACE . enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
@@ -994,7 +993,7 @@ At this point, an enumerator is expected.
translation_unit_file: ENUM XOR_ASSIGN
##
-## Ends in an error in state: 368.
+## Ends in an error in state: 348.
##
## enum_specifier -> ENUM attribute_specifier_list . option(other_identifier) LBRACE enumerator_list option(COMMA) RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## enum_specifier -> ENUM attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -1023,8 +1022,6 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF LPAREN XOR_ASSIGN
##
## Ends in an error in state: 65.
##
-## postfix_expression -> LPAREN . type_name RPAREN LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
-## primary_expression -> LPAREN . expression RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## unary_expression -> ALIGNOF LPAREN . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
@@ -1058,12 +1055,18 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ ALIGNOF XOR_ASSIGN
##
## Ends in an error in state: 64.
##
-## unary_expression -> ALIGNOF . unary_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## unary_expression -> ALIGNOF . LPAREN type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
## The known suffix of the stack is as follows:
## ALIGNOF
##
+
+Ill-formed use of $0.
+At this point, an opening parenthesis '(' is expected,
+followed with a type name.
+
+# ------------------------------------------------------------------------------
+
translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN
##
## Ends in an error in state: 23.
@@ -1075,7 +1078,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ SIZEOF XOR_ASSIGN
## SIZEOF
##
-# Let's not reveal that _Alignof and sizeof can be used without parentheses.
+# Let's not reveal that sizeof can be used without parentheses.
# gcc and clang say they expect an expression, which seems both surprising
# (they don't request a parenthesis) and incomplete (they don't allow a type name).
@@ -1088,7 +1091,7 @@ followed with an expression or a type name.
translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 351.
+## Ends in an error in state: 331.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression . COMMA type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1099,20 +1102,20 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME V
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
##
Ill-formed use of $2.
@@ -1125,7 +1128,7 @@ then at this point, a comma ',' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ BUILTIN_VA_ARG LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 352.
+## Ends in an error in state: 332.
##
## postfix_expression -> BUILTIN_VA_ARG LPAREN assignment_expression COMMA . type_name RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1194,7 +1197,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ INC LPAREN INT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 384.
+## Ends in an error in state: 364.
##
## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1246,7 +1249,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 338.
+## Ends in an error in state: 382.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## primary_expression -> LPAREN expression . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -1258,21 +1261,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN PRE_NAME VAR_NAME SEMICOL
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
# Since we are saying "if this expression is complete",
@@ -1290,7 +1293,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 327.
+## Ends in an error in state: 379.
##
## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ]
## postfix_expression -> LPAREN type_name RPAREN LBRACE initializer_list . option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -1302,22 +1305,22 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE PRE_NAM
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 320, spurious reduction of production c_initializer -> assignment_expression
-## In state 326, spurious reduction of production initializer_list -> option(designation) c_initializer
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 372, spurious reduction of production c_initializer -> assignment_expression
+## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer
##
# Let's ignore the fact that a comma can precede a closing brace.
@@ -1332,7 +1335,7 @@ then at this point, a closing brace '}' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 306.
+## Ends in an error in state: 365.
##
## postfix_expression -> LPAREN type_name RPAREN LBRACE . initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1349,7 +1352,7 @@ At this point, an initializer is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LPAREN INT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 387.
+## Ends in an error in state: 386.
##
## cast_expression -> LPAREN type_name RPAREN . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> LPAREN type_name RPAREN . LBRACE initializer_list option(COMMA) RBRACE [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -1393,7 +1396,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME EQ TILDE XOR_ASSIGN
##
-## Ends in an error in state: 66.
+## Ends in an error in state: 153.
##
## unary_expression -> unary_operator . cast_expression [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LEQ LEFT_ASSIGN LEFT HAT GT GEQ EQEQ EQ DIV_ASSIGN COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1410,7 +1413,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN
##
-## Ends in an error in state: 126.
+## Ends in an error in state: 213.
##
## and_expression -> and_expression AND . equality_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1419,7 +1422,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME AND XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASSIGN
##
-## Ends in an error in state: 115.
+## Ends in an error in state: 202.
##
## logical_and_expression -> logical_and_expression ANDAND . inclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ANDAND ]
##
@@ -1428,7 +1431,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME ANDAND XOR_ASS
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN
##
-## Ends in an error in state: 117.
+## Ends in an error in state: 204.
##
## inclusive_or_expression -> inclusive_or_expression BAR . exclusive_or_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR BAR ANDAND ]
##
@@ -1437,7 +1440,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BAR XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASSIGN
##
-## Ends in an error in state: 138.
+## Ends in an error in state: 225.
##
## logical_or_expression -> logical_or_expression BARBAR . logical_and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION COMMA COLON BARBAR ]
##
@@ -1446,7 +1449,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME BARBAR XOR_ASS
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN
##
-## Ends in an error in state: 119.
+## Ends in an error in state: 206.
##
## exclusive_or_expression -> exclusive_or_expression HAT . and_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION HAT COMMA COLON BARBAR BAR ANDAND ]
##
@@ -1455,7 +1458,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME HAT XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN
##
-## Ends in an error in state: 109.
+## Ends in an error in state: 196.
##
## relational_expression -> relational_expression relational_operator . shift_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ LT LEQ HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1464,7 +1467,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LT XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN
##
-## Ends in an error in state: 123.
+## Ends in an error in state: 210.
##
## equality_expression -> equality_expression equality_operator . relational_expression [ SEMICOLON RPAREN RBRACK RBRACE QUESTION NEQ HAT EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1473,7 +1476,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME NEQ XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIGN
##
-## Ends in an error in state: 102.
+## Ends in an error in state: 189.
##
## additive_expression -> additive_expression additive_operator . multiplicative_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1482,7 +1485,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PLUS XOR_ASSIG
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSIGN
##
-## Ends in an error in state: 91.
+## Ends in an error in state: 178.
##
## shift_expression -> shift_expression shift_operator . additive_expression [ SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION NEQ LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1491,7 +1494,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME RIGHT XOR_ASSI
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME STAR XOR_ASSIGN
##
-## Ends in an error in state: 96.
+## Ends in an error in state: 183.
##
## multiplicative_expression -> multiplicative_expression multiplicative_operator . cast_expression [ STAR SLASH SEMICOLON RPAREN RIGHT RBRACK RBRACE QUESTION PLUS PERCENT NEQ MINUS LT LEQ LEFT HAT GT GEQ EQEQ COMMA COLON BARBAR BAR ANDAND AND ]
##
@@ -1508,7 +1511,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME XOR_ASSIGN XOR_ASSIGN
##
-## Ends in an error in state: 87.
+## Ends in an error in state: 174.
##
## assignment_expression -> unary_expression assignment_operator . assignment_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
@@ -1525,7 +1528,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 145.
+## Ends in an error in state: 232.
##
## argument_expression_list -> argument_expression_list COMMA . assignment_expression [ RPAREN COMMA ]
##
@@ -1546,7 +1549,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN
##
-## Ends in an error in state: 151.
+## Ends in an error in state: 238.
##
## postfix_expression -> postfix_expression DOT . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1555,7 +1558,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME DOT XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME PTR XOR_ASSIGN
##
-## Ends in an error in state: 72.
+## Ends in an error in state: 159.
##
## postfix_expression -> postfix_expression PTR . general_identifier [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1572,7 +1575,7 @@ At this point, the name of a struct or union member is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 148.
+## Ends in an error in state: 235.
##
## expression -> expression . COMMA assignment_expression [ RBRACK COMMA ]
## postfix_expression -> postfix_expression LBRACK expression . RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -1584,21 +1587,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK PRE_NAM
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
# We know for sure that an array subscript expression has begun, and
@@ -1617,7 +1620,7 @@ then at this point, a closing bracket ']' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 147.
+## Ends in an error in state: 234.
##
## postfix_expression -> postfix_expression LBRACK . expression RBRACK [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1632,7 +1635,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 144.
+## Ends in an error in state: 231.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## option(argument_expression_list) -> argument_expression_list . [ RPAREN ]
@@ -1644,21 +1647,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN PRE_NAM
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 143, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
##
Up to this point, a list of expressions has been recognized:
@@ -1670,7 +1673,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 74.
+## Ends in an error in state: 161.
##
## postfix_expression -> postfix_expression LPAREN . option(argument_expression_list) RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
##
@@ -1688,7 +1691,7 @@ followed with a closing parenthesis ')', is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME COLON XOR_ASSIGN
##
-## Ends in an error in state: 135.
+## Ends in an error in state: 222.
##
## conditional_expression -> logical_or_expression QUESTION expression COLON . conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
@@ -1697,7 +1700,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_N
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION XOR_ASSIGN
##
-## Ends in an error in state: 113.
+## Ends in an error in state: 200.
##
## conditional_expression -> logical_or_expression QUESTION . expression COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
##
@@ -1712,7 +1715,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 131.
+## Ends in an error in state: 218.
##
## conditional_expression -> logical_or_expression QUESTION expression . COLON conditional_expression [ SEMICOLON RPAREN RBRACK RBRACE COMMA COLON ]
## expression -> expression . COMMA assignment_expression [ COMMA COLON ]
@@ -1724,21 +1727,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ PRE_NAME VAR_NAME QUESTION PRE_N
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
# gcc and clang simply expect a colon.
@@ -1755,7 +1758,7 @@ then at this point, a colon ':' is expected.
translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 392.
+## Ends in an error in state: 391.
##
## argument_expression_list -> argument_expression_list . COMMA assignment_expression [ RPAREN COMMA ]
## attribute_specifier -> PACKED LPAREN argument_expression_list . RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER RBRACK PRE_NAME PLUS PACKED NORETURN MINUS LPAREN LONG LBRACK LBRACE INT INLINE INC FLOAT EXTERN EQ ENUM DOUBLE DEC CONSTANT CONST COMMA COLON CHAR BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AUTO ATTRIBUTE AND ALIGNOF ALIGNAS ]
@@ -1767,21 +1770,21 @@ translation_unit_file: PACKED LPAREN PRE_NAME VAR_NAME SEMICOLON
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 143, spurious reduction of production argument_expression_list -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 230, spurious reduction of production argument_expression_list -> assignment_expression
##
Ill-formed $2 attribute.
@@ -1872,7 +1875,7 @@ At this point, one of the following is expected:
translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 395.
+## Ends in an error in state: 394.
##
## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1885,7 +1888,7 @@ translation_unit_file: TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 404.
+## Ends in an error in state: 403.
##
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1898,7 +1901,7 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 414.
+## Ends in an error in state: 413.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1911,7 +1914,7 @@ translation_unit_file: VOLATILE TYPEDEF PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 420.
+## Ends in an error in state: 419.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -1924,7 +1927,7 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME TYPEDEF XOR_ASSIGN
##
translation_unit_file: TYPEDEF INT XOR_ASSIGN
##
-## Ends in an error in state: 397.
+## Ends in an error in state: 396.
##
## declaration_specifiers_typedef -> TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -1934,7 +1937,7 @@ translation_unit_file: TYPEDEF INT XOR_ASSIGN
##
translation_unit_file: INT TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 408.
+## Ends in an error in state: 407.
##
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -1944,7 +1947,7 @@ translation_unit_file: INT TYPEDEF XOR_ASSIGN
##
translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN
##
-## Ends in an error in state: 416.
+## Ends in an error in state: 415.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -1954,7 +1957,7 @@ translation_unit_file: VOLATILE TYPEDEF INT XOR_ASSIGN
##
translation_unit_file: VOLATILE INT TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 424.
+## Ends in an error in state: 423.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) TYPEDEF list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2007,7 +2010,7 @@ translation_unit_file: TYPEDEF XOR_ASSIGN
##
translation_unit_file: VOLATILE TYPEDEF XOR_ASSIGN
##
-## Ends in an error in state: 412.
+## Ends in an error in state: 411.
##
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2041,7 +2044,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 222.
+## Ends in an error in state: 133.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
@@ -2053,7 +2056,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 214, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# Analogous to the above, except we are in the context of a parameter declaration,
@@ -2077,7 +2080,7 @@ At this point, one of the following is expected:
translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 402.
+## Ends in an error in state: 401.
##
## declaration_specifiers(declaration(external_declaration)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2091,7 +2094,7 @@ translation_unit_file: PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 418.
+## Ends in an error in state: 417.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2105,7 +2108,7 @@ translation_unit_file: VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
translation_unit_file: INT XOR_ASSIGN
##
-## Ends in an error in state: 406.
+## Ends in an error in state: 405.
##
## declaration_specifiers(declaration(external_declaration)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2116,7 +2119,7 @@ translation_unit_file: INT XOR_ASSIGN
##
translation_unit_file: VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 422.
+## Ends in an error in state: 421.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2177,7 +2180,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 201.
+## Ends in an error in state: 112.
##
## declaration_specifiers(parameter_declaration) -> typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
@@ -2190,7 +2193,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME TYPEDEF_NAME XOR_AS
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 224.
+## Ends in an error in state: 135.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
@@ -2203,7 +2206,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE PRE_NAME TYPEDEF_NA
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 207.
+## Ends in an error in state: 118.
##
## declaration_specifiers(parameter_declaration) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2213,7 +2216,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT XOR_ASSIGN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 226.
+## Ends in an error in state: 137.
##
## declaration_specifiers(parameter_declaration) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR RPAREN PRE_NAME LPAREN LBRACK COMMA ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2262,7 +2265,7 @@ At this point, one of the following is expected:
translation_unit_file: VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 410.
+## Ends in an error in state: 409.
##
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(external_declaration)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2278,7 +2281,7 @@ translation_unit_file: VOLATILE XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 214, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# We have seen some specifiers or qualifiers. We have probably seen at least
@@ -2307,7 +2310,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 519.
+## Ends in an error in state: 518.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2323,7 +2326,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 214, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
# Identical to the previous one, except we are not at the top level,
# so we know this cannot be the beginning of a function definition.
@@ -2338,7 +2341,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 516.
+## Ends in an error in state: 515.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2352,7 +2355,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 521.
+## Ends in an error in state: 520.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2366,7 +2369,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE INT XOR_ASSIGN
##
-## Ends in an error in state: 518.
+## Ends in an error in state: 517.
##
## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2377,7 +2380,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 523.
+## Ends in an error in state: 522.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . TYPEDEF list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -2417,7 +2420,7 @@ At this point, one of the following is expected:
translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 181.
+## Ends in an error in state: 92.
##
## struct_declaration -> specifier_qualifier_list(struct_declaration) . option(struct_declarator_list) SEMICOLON [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
##
@@ -2428,7 +2431,7 @@ translation_unit_file: UNION LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 167, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list)
+## In state 78, spurious reduction of production specifier_qualifier_list(struct_declaration) -> typedef_name option(type_qualifier_list)
##
# We have (spuriously) recognized a specifier_qualifier_list,
@@ -2474,19 +2477,19 @@ translation_unit_file: UNION LBRACE LONG COLON CONSTANT RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 67, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 154, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
## In state 292, spurious reduction of production struct_declarator -> option(declarator) COLON conditional_expression
## In state 294, spurious reduction of production struct_declarator_list -> struct_declarator
##
@@ -2573,7 +2576,7 @@ then at this point, one of the following is expected:
translation_unit_file: UNION LBRACE VOLATILE ADD_ASSIGN
##
-## Ends in an error in state: 175.
+## Ends in an error in state: 86.
##
## option(type_qualifier_list) -> type_qualifier_list . [ VOLATILE RESTRICT PACKED CONST ATTRIBUTE ALIGNAS ]
## specifier_qualifier_list(struct_declaration) -> type_qualifier_list . typedef_name option(type_qualifier_list) [ STAR SEMICOLON PRE_NAME LPAREN COLON ]
@@ -2596,7 +2599,7 @@ At this point, one of the following is expected:
translation_unit_file: UNION LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 164.
+## Ends in an error in state: 75.
##
## struct_declaration_list -> struct_declaration_list . struct_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT RESTRICT RBRACE PRE_NAME PACKED LONG INT FLOAT ENUM DOUBLE CONST CHAR ATTRIBUTE ALIGNAS ]
## struct_or_union_specifier -> struct_or_union attribute_specifier_list option(other_identifier) LBRACE struct_declaration_list . RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2616,7 +2619,7 @@ At this point, one of the following is expected:
translation_unit_file: UNION XOR_ASSIGN
##
-## Ends in an error in state: 161.
+## Ends in an error in state: 72.
##
## struct_or_union_specifier -> struct_or_union attribute_specifier_list . option(other_identifier) LBRACE struct_declaration_list RBRACE [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## struct_or_union_specifier -> struct_or_union attribute_specifier_list . general_identifier [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF STRUCT STATIC STAR SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK INT INLINE FLOAT EXTERN ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2628,7 +2631,7 @@ translation_unit_file: UNION XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 160, spurious reduction of production attribute_specifier_list ->
+## In state 71, spurious reduction of production attribute_specifier_list ->
##
# gcc expects '{'.
@@ -2661,7 +2664,7 @@ translation_unit_file: INT LPAREN PRE_NAME VAR_NAME SEMICOLON
## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
##
-Up to this point, a declarator have been recognized:
+Up to this point, a declarator has been recognized:
$0
If this declarator is complete,
then at this point, a closing parenthesis ')' is expected.
@@ -2670,7 +2673,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 187.
+## Ends in an error in state: 98.
##
## direct_declarator -> LPAREN save_context . declarator RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
##
@@ -2706,7 +2709,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 193.
+## Ends in an error in state: 104.
##
## context_parameter_type_list -> save_context . parameter_type_list save_context [ RPAREN ]
## direct_declarator -> direct_declarator LPAREN save_context . option(identifier_list) RPAREN [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -2730,7 +2733,7 @@ followed with a closing parenthesis ')', is expected.
translation_unit_file: INT STAR RPAREN
##
-## Ends in an error in state: 190.
+## Ends in an error in state: 101.
##
## declarator_noattrend -> list(pointer1) STAR option(type_qualifier_list) . direct_declarator [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## list(pointer1) -> list(pointer1) STAR option(type_qualifier_list) . [ STAR ]
@@ -2763,7 +2766,7 @@ At this point, one of the following is expected:
translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 535.
+## Ends in an error in state: 534.
##
## option(typedef_declarator_list) -> typedef_declarator_list . [ SEMICOLON ]
## typedef_declarator_list -> typedef_declarator_list . COMMA typedef_declarator [ SEMICOLON COMMA ]
@@ -2778,9 +2781,9 @@ translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME XOR_ASSIGN
## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
## In state 260, spurious reduction of production attribute_specifier_list ->
## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
-## In state 539, spurious reduction of production declare_typename(declarator) -> declarator
-## In state 538, spurious reduction of production typedef_declarator -> declare_typename(declarator)
-## In state 540, spurious reduction of production typedef_declarator_list -> typedef_declarator
+## In state 538, spurious reduction of production declare_typename(declarator) -> declarator
+## In state 537, spurious reduction of production typedef_declarator -> declare_typename(declarator)
+## In state 539, spurious reduction of production typedef_declarator_list -> typedef_declarator
##
# Because attribute_specifier_list, declarator and declarator_noattrend have been marked
@@ -2806,7 +2809,7 @@ then at this point, a semicolon ';' is expected.
translation_unit_file: TYPEDEF INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 536.
+## Ends in an error in state: 535.
##
## typedef_declarator_list -> typedef_declarator_list COMMA . typedef_declarator [ SEMICOLON COMMA ]
##
@@ -2835,7 +2838,7 @@ followed with a closing parenthesis ')', is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM CONST XOR_ASSIGN
##
-## Ends in an error in state: 451.
+## Ends in an error in state: 450.
##
## asm_attributes -> CONST . asm_attributes [ LPAREN ]
##
@@ -2844,7 +2847,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 450.
+## Ends in an error in state: 449.
##
## asm_attributes -> VOLATILE . asm_attributes [ LPAREN ]
##
@@ -2853,7 +2856,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM XOR_ASSIGN
##
-## Ends in an error in state: 449.
+## Ends in an error in state: 448.
##
## asm_statement -> ASM . asm_attributes LPAREN string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -2870,7 +2873,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL COMMA XOR_ASSIGN
##
-## Ends in an error in state: 475.
+## Ends in an error in state: 474.
##
## asm_flags -> asm_flags COMMA . string_literals_list [ RPAREN COMMA ]
##
@@ -2882,7 +2885,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
# first(asm_flags) = STRING_LITERAL
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON XOR_ASSIGN
##
-## Ends in an error in state: 472.
+## Ends in an error in state: 471.
##
## asm_arguments -> COLON asm_operands COLON asm_operands COLON . asm_flags [ RPAREN ]
##
@@ -2902,7 +2905,7 @@ Examples of clobbered resources:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON COLON STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 474.
+## Ends in an error in state: 473.
##
## asm_arguments -> COLON asm_operands COLON asm_operands COLON asm_flags . [ RPAREN ]
## asm_flags -> asm_flags . COMMA string_literals_list [ RPAREN COMMA ]
@@ -2914,7 +2917,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 473, spurious reduction of production asm_flags -> string_literals_list
+## In state 472, spurious reduction of production asm_flags -> string_literals_list
##
# Let's ignore the possibility of concatenating string literals.
@@ -2931,7 +2934,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 469.
+## Ends in an error in state: 468.
##
## asm_arguments -> COLON asm_operands . [ RPAREN ]
## asm_arguments -> COLON asm_operands . COLON asm_operands [ RPAREN ]
@@ -2944,7 +2947,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 461, spurious reduction of production asm_operands -> asm_operands_ne
+## In state 460, spurious reduction of production asm_operands -> asm_operands_ne
##
# We have seen one COLON, hence the outputs. (The list of outputs may be empty.)
@@ -2961,7 +2964,7 @@ then at this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON COLON XOR_ASSIGN
##
-## Ends in an error in state: 471.
+## Ends in an error in state: 470.
##
## asm_arguments -> COLON asm_operands COLON asm_operands . [ RPAREN ]
## asm_arguments -> COLON asm_operands COLON asm_operands . COLON asm_flags [ RPAREN ]
@@ -2973,7 +2976,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 470, spurious reduction of production asm_operands ->
+## In state 469, spurious reduction of production asm_operands ->
##
# We have seen two COLONs, hence the outputs and inputs. (The list of inputs may be empty.)
@@ -2993,7 +2996,7 @@ then at this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME RBRACK XOR_ASSIGN
##
-## Ends in an error in state: 464.
+## Ends in an error in state: 463.
##
## asm_operand -> asm_op_name . string_literals_list LPAREN expression RPAREN [ RPAREN COMMA COLON ]
##
@@ -3012,7 +3015,7 @@ At this point, a string literal, representing a constraint, is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 459.
+## Ends in an error in state: 458.
##
## asm_op_name -> LBRACK general_identifier . RBRACK [ STRING_LITERAL ]
##
@@ -3027,7 +3030,7 @@ At this point, a closing bracket ']' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 458.
+## Ends in an error in state: 457.
##
## asm_op_name -> LBRACK . general_identifier RBRACK [ STRING_LITERAL ]
##
@@ -3042,7 +3045,7 @@ At this point, an identifier is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN CONSTANT RPAREN COMMA XOR_ASSIGN
##
-## Ends in an error in state: 462.
+## Ends in an error in state: 461.
##
## asm_operands_ne -> asm_operands_ne COMMA . asm_operand [ RPAREN COMMA COLON ]
##
@@ -3059,7 +3062,7 @@ At this point, an assembly operand is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 467.
+## Ends in an error in state: 466.
##
## asm_operand -> asm_op_name string_literals_list LPAREN expression . RPAREN [ RPAREN COMMA COLON ]
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
@@ -3071,21 +3074,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Ill-formed assembly operand.
@@ -3098,7 +3101,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 466.
+## Ends in an error in state: 465.
##
## asm_operand -> asm_op_name string_literals_list LPAREN . expression RPAREN [ RPAREN COMMA COLON ]
##
@@ -3113,7 +3116,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL COLON STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 465.
+## Ends in an error in state: 464.
##
## asm_operand -> asm_op_name string_literals_list . LPAREN expression RPAREN [ RPAREN COMMA COLON ]
## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL LPAREN ]
@@ -3133,7 +3136,7 @@ followed with an expression and a closing parenthesis ')', is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL XOR_ASSIGN
##
-## Ends in an error in state: 456.
+## Ends in an error in state: 455.
##
## asm_statement -> ASM asm_attributes LPAREN string_literals_list . asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
## string_literals_list -> string_literals_list . STRING_LITERAL [ STRING_LITERAL RPAREN COLON ]
@@ -3155,7 +3158,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 455.
+## Ends in an error in state: 454.
##
## asm_statement -> ASM asm_attributes LPAREN . string_literals_list asm_arguments RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3170,7 +3173,7 @@ At this point, a string literal, representing an instruction, is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE BREAK XOR_ASSIGN
##
-## Ends in an error in state: 447.
+## Ends in an error in state: 446.
##
## jump_statement -> BREAK . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3179,7 +3182,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CONTINUE XOR_ASSIGN
##
-## Ends in an error in state: 442.
+## Ends in an error in state: 441.
##
## jump_statement -> CONTINUE . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3188,7 +3191,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 566.
+## Ends in an error in state: 565.
##
## iteration_statement -> save_context do_statement1 WHILE LPAREN expression RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3197,7 +3200,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 438.
+## Ends in an error in state: 437.
##
## jump_statement -> GOTO general_identifier . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3206,7 +3209,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE ASM LPAREN STRING_LITERAL RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 479.
+## Ends in an error in state: 478.
##
## asm_statement -> ASM asm_attributes LPAREN string_literals_list asm_arguments RPAREN . SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3221,7 +3224,7 @@ At this point, a semicolon ';' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT COLON XOR_ASSIGN
##
-## Ends in an error in state: 446.
+## Ends in an error in state: 445.
##
## labeled_statement -> CASE conditional_expression COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3230,7 +3233,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT COLON XOR_ASSIGN
##
-## Ends in an error in state: 441.
+## Ends in an error in state: 440.
##
## labeled_statement -> DEFAULT COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3239,7 +3242,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COLON XOR_ASSIGN
##
-## Ends in an error in state: 495.
+## Ends in an error in state: 494.
##
## labeled_statement -> general_identifier COLON . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3256,7 +3259,7 @@ At this point, a statement is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE CONSTANT SEMICOLON
##
-## Ends in an error in state: 445.
+## Ends in an error in state: 444.
##
## labeled_statement -> CASE conditional_expression . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3267,19 +3270,19 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 67, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 154, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
##
Ill-formed labeled statement.
@@ -3292,7 +3295,7 @@ then at this point, a colon ':' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE CASE XOR_ASSIGN
##
-## Ends in an error in state: 444.
+## Ends in an error in state: 443.
##
## labeled_statement -> CASE . conditional_expression COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3307,7 +3310,7 @@ At this point, a constant expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DEFAULT XOR_ASSIGN
##
-## Ends in an error in state: 440.
+## Ends in an error in state: 439.
##
## labeled_statement -> DEFAULT . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3316,7 +3319,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 494.
+## Ends in an error in state: 493.
##
## labeled_statement -> general_identifier . COLON statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3333,7 +3336,7 @@ At this point, a colon ':' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 565.
+## Ends in an error in state: 564.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## iteration_statement -> save_context do_statement1 WHILE LPAREN expression . RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3345,21 +3348,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'do' ... 'while' statement.
@@ -3372,7 +3375,7 @@ then at this point, a closing parenthesis ')' and a semicolon ';' are expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 564.
+## Ends in an error in state: 563.
##
## iteration_statement -> save_context do_statement1 WHILE LPAREN . expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3387,7 +3390,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON WHILE XOR_ASSIGN
##
-## Ends in an error in state: 563.
+## Ends in an error in state: 562.
##
## iteration_statement -> save_context do_statement1 WHILE . LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3402,7 +3405,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 562.
+## Ends in an error in state: 561.
##
## iteration_statement -> save_context do_statement1 . WHILE LPAREN expression RPAREN SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3423,7 +3426,7 @@ At this point, a 'while' keyword is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO XOR_ASSIGN
##
-## Ends in an error in state: 558.
+## Ends in an error in state: 557.
##
## do_statement1 -> save_context DO . statement [ WHILE ]
##
@@ -3440,7 +3443,7 @@ At this point, a statement (the loop body) is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 528.
+## Ends in an error in state: 527.
##
## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3455,7 +3458,7 @@ At this point, a statement (the loop body) is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 530.
+## Ends in an error in state: 529.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## optional(expression,RPAREN) -> expression . RPAREN [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
@@ -3467,21 +3470,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
# The use of optional(expression,RPAREN) tells us that we are in a FOR statement.
@@ -3497,7 +3500,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 526.
+## Ends in an error in state: 525.
##
## iteration_statement -> save_context FOR LPAREN for_statement_header optional(expression,SEMICOLON) . optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3517,7 +3520,7 @@ followed with a closing parenthesis ')', is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 525.
+## Ends in an error in state: 524.
##
## iteration_statement -> save_context FOR LPAREN for_statement_header . optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3536,7 +3539,7 @@ followed with a semicolon ';', is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN PRE_NAME VAR_NAME RPAREN
##
-## Ends in an error in state: 532.
+## Ends in an error in state: 531.
##
## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ]
## optional(expression,SEMICOLON) -> expression . SEMICOLON [ TILDE STRING_LITERAL STAR SIZEOF SEMICOLON RPAREN PRE_NAME PLUS MINUS LPAREN INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ]
@@ -3548,21 +3551,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
# At the time of writing, optional(expression,SEMICOLON) is used only in FOR
@@ -3578,7 +3581,7 @@ then at this point, a semicolon ';' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 513.
+## Ends in an error in state: 512.
##
## iteration_statement -> save_context FOR LPAREN . for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3599,7 +3602,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE FOR XOR_ASSIGN
##
-## Ends in an error in state: 512.
+## Ends in an error in state: 511.
##
## iteration_statement -> save_context FOR . LPAREN for_statement_header optional(expression,SEMICOLON) optional(expression,RPAREN) statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3614,7 +3617,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE GOTO XOR_ASSIGN
##
-## Ends in an error in state: 437.
+## Ends in an error in state: 436.
##
## jump_statement -> GOTO . general_identifier SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3629,7 +3632,7 @@ At this point, an identifier (a 'goto' label) is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE DO IF LPAREN CONSTANT RPAREN SEMICOLON ELSE XOR_ASSIGN
##
-## Ends in an error in state: 560.
+## Ends in an error in state: 559.
##
## selection_statement -> save_context ifelse_statement1 . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3644,7 +3647,7 @@ At this point, a statement is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 509.
+## Ends in an error in state: 508.
##
## ifelse_statement1 -> IF LPAREN expression RPAREN save_context . statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
## selection_statement -> save_context IF LPAREN expression RPAREN save_context . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3660,7 +3663,7 @@ At this point, a statement is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 507.
+## Ends in an error in state: 506.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## ifelse_statement1 -> IF LPAREN expression . RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
@@ -3673,21 +3676,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'if' statement.
@@ -3700,7 +3703,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 506.
+## Ends in an error in state: 505.
##
## ifelse_statement1 -> IF LPAREN . expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
## selection_statement -> save_context IF LPAREN . expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3716,7 +3719,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE IF XOR_ASSIGN
##
-## Ends in an error in state: 505.
+## Ends in an error in state: 504.
##
## ifelse_statement1 -> IF . LPAREN expression RPAREN save_context statement ELSE [ WHILE TILDE SWITCH STRING_LITERAL STAR SIZEOF SEMICOLON RETURN PRE_NAME PLUS MINUS LPAREN LBRACE INC IF GOTO FOR DO DEFAULT DEC CONTINUE CONSTANT CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG ASM AND ALIGNOF ]
## selection_statement -> save_context IF . LPAREN expression RPAREN save_context statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3732,7 +3735,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 503.
+## Ends in an error in state: 502.
##
## selection_statement -> save_context SWITCH LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3756,7 +3759,7 @@ enclosed within braces '{' and '}'.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 502.
+## Ends in an error in state: 501.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## selection_statement -> save_context SWITCH LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3768,21 +3771,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'switch' statement.
@@ -3795,7 +3798,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 501.
+## Ends in an error in state: 500.
##
## selection_statement -> save_context SWITCH LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3810,7 +3813,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE SWITCH XOR_ASSIGN
##
-## Ends in an error in state: 500.
+## Ends in an error in state: 499.
##
## selection_statement -> save_context SWITCH . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3825,7 +3828,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 487.
+## Ends in an error in state: 486.
##
## iteration_statement -> save_context WHILE LPAREN expression RPAREN . statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3840,7 +3843,7 @@ At this point, a statement (the loop body) is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 486.
+## Ends in an error in state: 485.
##
## expression -> expression . COMMA assignment_expression [ RPAREN COMMA ]
## iteration_statement -> save_context WHILE LPAREN expression . RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3852,21 +3855,21 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Ill-formed 'while' statement.
@@ -3879,7 +3882,7 @@ then at this point, a closing parenthesis ')' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE LPAREN XOR_ASSIGN
##
-## Ends in an error in state: 485.
+## Ends in an error in state: 484.
##
## iteration_statement -> save_context WHILE LPAREN . expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3894,7 +3897,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE WHILE XOR_ASSIGN
##
-## Ends in an error in state: 484.
+## Ends in an error in state: 483.
##
## iteration_statement -> save_context WHILE . LPAREN expression RPAREN statement [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3909,7 +3912,7 @@ At this point, an opening parenthesis '(' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 428.
+## Ends in an error in state: 427.
##
## block_item_list -> option(block_item_list) . block_item [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
## compound_statement -> save_context LBRACE option(block_item_list) . RBRACE [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN EOF ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
@@ -3937,7 +3940,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE RETURN XOR_ASSIGN
##
-## Ends in an error in state: 429.
+## Ends in an error in state: 428.
##
## jump_statement -> RETURN . option(expression) SEMICOLON [ WHILE VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL TYPEDEF TILDE SWITCH STRUCT STRING_LITERAL STATIC STAR SIZEOF SIGNED SHORT SEMICOLON RETURN RESTRICT REGISTER RBRACE PRE_NAME PRAGMA PLUS PACKED NORETURN MINUS LPAREN LONG LBRACE INT INLINE INC IF GOTO FOR FLOAT EXTERN ENUM ELSE DOUBLE DO DEFAULT DEC CONTINUE CONSTANT CONST CHAR CASE BUILTIN_VA_ARG BUILTIN_OFFSETOF BREAK BANG AUTO ATTRIBUTE ASM AND ALIGNOF ALIGNAS ]
##
@@ -3956,7 +3959,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE STRING_LITERAL RPAREN
##
-## Ends in an error in state: 432.
+## Ends in an error in state: 431.
##
## expression -> expression . COMMA assignment_expression [ SEMICOLON COMMA ]
## option(expression) -> expression . [ SEMICOLON ]
@@ -3968,23 +3971,23 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 68, spurious reduction of production primary_expression -> string_literals_list
-## In state 70, spurious reduction of production postfix_expression -> primary_expression
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 137, spurious reduction of production expression -> assignment_expression
+## In state 155, spurious reduction of production primary_expression -> string_literals_list
+## In state 157, spurious reduction of production postfix_expression -> primary_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 224, spurious reduction of production expression -> assignment_expression
##
Up to this point, an expression has been recognized:
@@ -3996,7 +3999,7 @@ then at this point, a semicolon ';' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 569.
+## Ends in an error in state: 568.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name . list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers_typedef -> typedef_name . list(declaration_specifier_no_type) TYPEDEF list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -4031,7 +4034,7 @@ at this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME RPAREN LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 132.
+## Ends in an error in state: 219.
##
## expression -> expression COMMA . assignment_expression [ SEMICOLON RPAREN RBRACK COMMA COLON ]
##
@@ -4046,7 +4049,7 @@ At this point, an expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN
##
-## Ends in an error in state: 546.
+## Ends in an error in state: 545.
##
## init_declarator_list -> init_declarator_list . COMMA init_declarator [ SEMICOLON COMMA ]
## option(init_declarator_list) -> init_declarator_list . [ SEMICOLON ]
@@ -4059,11 +4062,11 @@ translation_unit_file: INT PRE_NAME VAR_NAME COMMA PRE_NAME VAR_NAME RPAREN
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 255, spurious reduction of production declarator_noattrend -> direct_declarator
-## In state 554, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend
-## In state 549, spurious reduction of production save_context ->
-## In state 550, spurious reduction of production attribute_specifier_list ->
-## In state 551, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list
-## In state 548, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator
+## In state 553, spurious reduction of production declare_varname(declarator_noattrend) -> declarator_noattrend
+## In state 548, spurious reduction of production save_context ->
+## In state 549, spurious reduction of production attribute_specifier_list ->
+## In state 550, spurious reduction of production init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list
+## In state 547, spurious reduction of production init_declarator_list -> init_declarator_list COMMA init_declarator
##
Up to this point, a list of declarators has been recognized:
@@ -4075,7 +4078,7 @@ then at this point, a semicolon ';' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 547.
+## Ends in an error in state: 546.
##
## init_declarator_list -> init_declarator_list COMMA . init_declarator [ SEMICOLON COMMA ]
##
@@ -4090,7 +4093,7 @@ At this point, an init declarator is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ ALIGNAS
##
-## Ends in an error in state: 314.
+## Ends in an error in state: 366.
##
## initializer_list -> option(designation) . c_initializer [ RBRACE COMMA ]
##
@@ -4099,7 +4102,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME EQ
##
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA DOT PRE_NAME VAR_NAME EQ ALIGNAS
##
-## Ends in an error in state: 318.
+## Ends in an error in state: 370.
##
## initializer_list -> initializer_list COMMA option(designation) . c_initializer [ RBRACE COMMA ]
##
@@ -4114,7 +4117,7 @@ At this point, an initializer is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT PRE_NAME VAR_NAME XOR_ASSIGN
##
-## Ends in an error in state: 321.
+## Ends in an error in state: 373.
##
## designation -> designator_list . EQ [ TILDE STRING_LITERAL STAR SIZEOF PRE_NAME PLUS MINUS LPAREN LBRACE INC DEC CONSTANT BUILTIN_VA_ARG BUILTIN_OFFSETOF BANG AND ALIGNOF ]
## option(designator_list) -> designator_list . [ LBRACK DOT ]
@@ -4136,7 +4139,7 @@ then at this point, an equals sign '=' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE DOT XOR_ASSIGN
##
-## Ends in an error in state: 311.
+## Ends in an error in state: 326.
##
## designator -> DOT . general_identifier [ RPAREN LBRACK EQ DOT ]
##
@@ -4153,7 +4156,7 @@ At this point, the name of a struct or union member is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 309.
+## Ends in an error in state: 324.
##
## designator -> LBRACK conditional_expression . RBRACK [ RPAREN LBRACK EQ DOT ]
##
@@ -4164,19 +4167,19 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK PRE_NAME VAR_NAME
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 67, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 154, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
##
Ill-formed designator.
@@ -4189,7 +4192,7 @@ then at this point, a closing bracket ']' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE LBRACK XOR_ASSIGN
##
-## Ends in an error in state: 308.
+## Ends in an error in state: 323.
##
## designator -> LBRACK . conditional_expression RBRACK [ RPAREN LBRACK EQ DOT ]
##
@@ -4204,7 +4207,7 @@ At this point, a constant expression is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE PRE_NAME VAR_NAME COMMA XOR_ASSIGN
##
-## Ends in an error in state: 317.
+## Ends in an error in state: 369.
##
## initializer_list -> initializer_list COMMA . option(designation) c_initializer [ RBRACE COMMA ]
## option(COMMA) -> COMMA . [ RBRACE ]
@@ -4225,7 +4228,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON
##
-## Ends in an error in state: 316.
+## Ends in an error in state: 368.
##
## c_initializer -> LBRACE initializer_list . option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ]
## initializer_list -> initializer_list . COMMA option(designation) c_initializer [ RBRACE COMMA ]
@@ -4237,22 +4240,22 @@ translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE CONSTANT SEMICOLON
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
-## In state 320, spurious reduction of production c_initializer -> assignment_expression
-## In state 326, spurious reduction of production initializer_list -> option(designation) c_initializer
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
+## In state 372, spurious reduction of production c_initializer -> assignment_expression
+## In state 378, spurious reduction of production initializer_list -> option(designation) c_initializer
##
# Omitting the fact that the closing brace can be preceded with a comma.
@@ -4267,7 +4270,7 @@ then at this point, a closing brace '}' is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ LBRACE XOR_ASSIGN
##
-## Ends in an error in state: 315.
+## Ends in an error in state: 367.
##
## c_initializer -> LBRACE . initializer_list option(COMMA) RBRACE [ SEMICOLON RBRACE COMMA ]
##
@@ -4288,7 +4291,7 @@ followed with an initializer, is expected.
translation_unit_file: INT PRE_NAME VAR_NAME EQ XOR_ASSIGN
##
-## Ends in an error in state: 552.
+## Ends in an error in state: 551.
##
## init_declarator -> declare_varname(declarator_noattrend) save_context attribute_specifier_list EQ . c_initializer [ SEMICOLON COMMA ]
##
@@ -4316,20 +4319,20 @@ translation_unit_file: INT PRE_NAME VAR_NAME LBRACK CONSTANT SEMICOLON
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 71, spurious reduction of production unary_expression -> postfix_expression
-## In state 75, spurious reduction of production cast_expression -> unary_expression
-## In state 98, spurious reduction of production multiplicative_expression -> cast_expression
-## In state 92, spurious reduction of production additive_expression -> multiplicative_expression
-## In state 111, spurious reduction of production shift_expression -> additive_expression
-## In state 88, spurious reduction of production relational_expression -> shift_expression
-## In state 104, spurious reduction of production equality_expression -> relational_expression
-## In state 120, spurious reduction of production and_expression -> equality_expression
-## In state 128, spurious reduction of production exclusive_or_expression -> and_expression
-## In state 129, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
-## In state 130, spurious reduction of production logical_and_expression -> inclusive_or_expression
-## In state 114, spurious reduction of production logical_or_expression -> logical_and_expression
-## In state 112, spurious reduction of production conditional_expression -> logical_or_expression
-## In state 133, spurious reduction of production assignment_expression -> conditional_expression
+## In state 158, spurious reduction of production unary_expression -> postfix_expression
+## In state 162, spurious reduction of production cast_expression -> unary_expression
+## In state 185, spurious reduction of production multiplicative_expression -> cast_expression
+## In state 179, spurious reduction of production additive_expression -> multiplicative_expression
+## In state 198, spurious reduction of production shift_expression -> additive_expression
+## In state 175, spurious reduction of production relational_expression -> shift_expression
+## In state 191, spurious reduction of production equality_expression -> relational_expression
+## In state 207, spurious reduction of production and_expression -> equality_expression
+## In state 215, spurious reduction of production exclusive_or_expression -> and_expression
+## In state 216, spurious reduction of production inclusive_or_expression -> exclusive_or_expression
+## In state 217, spurious reduction of production logical_and_expression -> inclusive_or_expression
+## In state 201, spurious reduction of production logical_or_expression -> logical_and_expression
+## In state 199, spurious reduction of production conditional_expression -> logical_or_expression
+## In state 220, spurious reduction of production assignment_expression -> conditional_expression
##
# At the time of writing, optional(expression,RBRACK) is used only in direct
@@ -4380,7 +4383,7 @@ The following type name is used as a K&R parameter name:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT XOR_ASSIGN
##
-## Ends in an error in state: 587.
+## Ends in an error in state: 586.
##
## declaration_specifiers(declaration(block_item)) -> type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -4390,7 +4393,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE INT XOR_ASSIGN
##
-## Ends in an error in state: 592.
+## Ends in an error in state: 591.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_typedef_name) -> list(declaration_specifier_no_typedef_name) . declaration_specifier_no_typedef_name [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC STAR SIGNED SHORT SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
@@ -4400,7 +4403,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOL
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 585.
+## Ends in an error in state: 584.
##
## declaration_specifiers(declaration(block_item)) -> typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -4413,7 +4416,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN PRE
##
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 590.
+## Ends in an error in state: 589.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) typedef_name list(declaration_specifier_no_type) . [ STAR SEMICOLON PRE_NAME LPAREN ]
## list(declaration_specifier_no_type) -> list(declaration_specifier_no_type) . storage_class_specifier_no_typedef [ VOLATILE STATIC STAR SEMICOLON RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN INLINE EXTERN CONST AUTO ATTRIBUTE ALIGNAS ]
@@ -4438,7 +4441,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOLATILE XOR_ASSIGN
##
-## Ends in an error in state: 588.
+## Ends in an error in state: 587.
##
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . typedef_name list(declaration_specifier_no_type) [ STAR SEMICOLON PRE_NAME LPAREN ]
## declaration_specifiers(declaration(block_item)) -> rlist(declaration_specifier_no_type) . type_specifier_no_typedef_name list(declaration_specifier_no_typedef_name) [ STAR SEMICOLON PRE_NAME LPAREN ]
@@ -4450,7 +4453,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN VOL
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 214, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
+## In state 125, spurious reduction of production rlist(declaration_specifier_no_type) -> type_qualifier_noattr
##
Ill-formed K&R parameter declaration.
@@ -4463,7 +4466,7 @@ At this point, one of the following is expected:
translation_unit_file: VOID PRE_NAME TYPEDEF_NAME PACKED LPAREN CONSTANT RPAREN XOR_ASSIGN
##
-## Ends in an error in state: 601.
+## Ends in an error in state: 600.
##
## attribute_specifier_list -> attribute_specifier . attribute_specifier_list [ SEMICOLON LBRACE EQ COMMA ]
## rlist(declaration_specifier_no_type) -> attribute_specifier . [ VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT SIGNED SHORT PRE_NAME LONG INT FLOAT ENUM DOUBLE CHAR ]
@@ -4496,7 +4499,7 @@ If this is the parameter declaration of a K&R function definition,
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT COMMA XOR_ASSIGN
##
-## Ends in an error in state: 230.
+## Ends in an error in state: 141.
##
## parameter_list -> parameter_list COMMA . parameter_declaration [ RPAREN COMMA ]
## parameter_type_list -> parameter_list COMMA . ELLIPSIS [ RPAREN ]
@@ -4513,7 +4516,7 @@ At this point, one of the following is expected:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICOLON
##
-## Ends in an error in state: 229.
+## Ends in an error in state: 140.
##
## parameter_list -> parameter_list . COMMA parameter_declaration [ RPAREN COMMA ]
## parameter_type_list -> parameter_list . [ RPAREN ]
@@ -4531,7 +4534,7 @@ translation_unit_file: INT PRE_NAME VAR_NAME LPAREN INT PRE_NAME VAR_NAME SEMICO
## In state 261, spurious reduction of production declarator -> declarator_noattrend attribute_specifier_list
## In state 277, spurious reduction of production declare_varname(declarator) -> declarator
## In state 276, spurious reduction of production parameter_declaration -> declaration_specifiers(parameter_declaration) declare_varname(declarator)
-## In state 237, spurious reduction of production parameter_list -> parameter_declaration
+## In state 148, spurious reduction of production parameter_list -> parameter_declaration
##
# We omit the possibility of an ellipsis.
@@ -4567,7 +4570,7 @@ The following identifier is used as a type, but has not been defined as such:
translation_unit_file: INT PRE_NAME VAR_NAME LPAREN PRE_NAME VAR_NAME RPAREN INT SEMICOLON XOR_ASSIGN
##
-## Ends in an error in state: 597.
+## Ends in an error in state: 596.
##
## declaration_list -> declaration_list . kr_param_declaration [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT RESTRICT REGISTER PRE_NAME PACKED NORETURN LONG LBRACE INT INLINE FLOAT EXTERN ENUM DOUBLE CONST CHAR AUTO ATTRIBUTE ALIGNAS ]
## function_definition1 -> declaration_specifiers(declaration(external_declaration)) declare_varname(declarator_noattrend) save_context declaration_list . [ LBRACE ]
@@ -4618,7 +4621,7 @@ At this point, a struct or union name is expected.
translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN
##
-## Ends in an error in state: 345.
+## Ends in an error in state: 318.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name . COMMA general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -4630,9 +4633,9 @@ translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID XOR_ASSIGN
## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next).
-## In state 156, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
-## In state 330, spurious reduction of production option(abstract_declarator(type_name)) ->
-## In state 336, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
+## In state 67, spurious reduction of production specifier_qualifier_list(type_name) -> type_specifier_no_typedef_name list(specifier_qualifier_no_typedef_name)
+## In state 306, spurious reduction of production option(abstract_declarator(type_name)) ->
+## In state 312, spurious reduction of production type_name -> specifier_qualifier_list(type_name) option(abstract_declarator(type_name))
##
Ill-formed __builtin_offsetof.
@@ -4642,7 +4645,7 @@ At this point, a colon ',' is expected
translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA XOR_ASSIGN
##
-## Ends in an error in state: 346.
+## Ends in an error in state: 319.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA . general_identifier designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -4658,7 +4661,7 @@ At this point, a member-designator is expected.
translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME XOR_ASSIGN
##
-## Ends in an error in state: 347.
+## Ends in an error in state: 320.
##
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier . designator_list RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -4674,7 +4677,7 @@ At this point, a member-designator is expected.
translation_unit_file: PACKED LPAREN BUILTIN_OFFSETOF LPAREN VOID COMMA PRE_NAME TYPEDEF_NAME LBRACK STRING_LITERAL RBRACK XOR_ASSIGN
##
-## Ends in an error in state: 349.
+## Ends in an error in state: 329.
##
## option(designator_list) -> designator_list . [ LBRACK DOT ]
## postfix_expression -> BUILTIN_OFFSETOF LPAREN type_name COMMA general_identifier designator_list . RPAREN [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RPAREN RIGHT_ASSIGN RIGHT RBRACK RBRACE QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA COLON BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -4701,7 +4704,7 @@ translation_unit_file: ALIGNAS LPAREN PRE_NAME XOR_ASSIGN
##
translation_unit_file: ALIGNAS LPAREN VOID LPAREN VOID LPAREN PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 236.
+## Ends in an error in state: 147.
##
## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ]
## declarator_identifier -> PRE_NAME . VAR_NAME [ RPAREN PACKED LPAREN LBRACK ATTRIBUTE ALIGNAS ]
@@ -4722,7 +4725,7 @@ translation_unit_file: UNION PRE_NAME XOR_ASSIGN
##
translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 434.
+## Ends in an error in state: 433.
##
## general_identifier -> PRE_NAME . VAR_NAME [ COLON ]
## primary_expression -> PRE_NAME . VAR_NAME [ XOR_ASSIGN SUB_ASSIGN STAR SLASH SEMICOLON RIGHT_ASSIGN RIGHT QUESTION PTR PLUS PERCENT OR_ASSIGN NEQ MUL_ASSIGN MOD_ASSIGN MINUS LT LPAREN LEQ LEFT_ASSIGN LEFT LBRACK INC HAT GT GEQ EQEQ EQ DOT DIV_ASSIGN DEC COMMA BARBAR BAR AND_ASSIGN ANDAND AND ADD_ASSIGN ]
@@ -4733,7 +4736,7 @@ translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LBRACE PRE_NAME XOR_ASSIGN
##
translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 194.
+## Ends in an error in state: 105.
##
## identifier_list -> PRE_NAME . VAR_NAME [ RPAREN COMMA ]
## typedef_name -> PRE_NAME . TYPEDEF_NAME [ VOLATILE STATIC STAR RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LBRACK INLINE EXTERN CONST COMMA AUTO ATTRIBUTE ALIGNAS ]
@@ -4743,7 +4746,7 @@ translation_unit_file: VOID PRE_NAME TYPEDEF_NAME LPAREN PRE_NAME XOR_ASSIGN
##
translation_unit_file: VOID PRE_NAME XOR_ASSIGN
##
-## Ends in an error in state: 182.
+## Ends in an error in state: 93.
##
## declarator_identifier -> PRE_NAME . low_prec TYPEDEF_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
## declarator_identifier -> PRE_NAME . VAR_NAME [ VOLATILE VOID UNSIGNED UNION UNDERSCORE_BOOL STRUCT STATIC SIGNED SHORT SEMICOLON RPAREN RESTRICT REGISTER PRE_NAME PACKED NORETURN LPAREN LONG LBRACK LBRACE INT INLINE FLOAT EXTERN EQ ENUM DOUBLE CONST COMMA COLON CHAR AUTO ATTRIBUTE ALIGNAS ]
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index 04fbcb94..71eaf419 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -275,7 +275,6 @@ unary_expression:
| unary_operator cast_expression
| SIZEOF unary_expression
| SIZEOF LPAREN type_name RPAREN
-| ALIGNOF unary_expression
| ALIGNOF LPAREN type_name RPAREN
{}