aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Elab.ml8
-rw-r--r--cparser/Lexer.mll2
-rw-r--r--cparser/handcrafted.messages2
3 files changed, 6 insertions, 6 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index b35963f7..718261b4 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -160,7 +160,7 @@ let combine_toplevel_definitions loc env s old_sto old_ty sto ty =
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"
+ warning loc Ignored_attributes "attribute declaration must precede definition"
end;
let new_sto =
(* The only case not allowed is removing static *)
@@ -1080,7 +1080,7 @@ and elab_struct_or_union_info kind loc env members attrs =
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, ""
@@ -1920,7 +1920,7 @@ let elab_expr ctx 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 -> fatal_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 *)
@@ -2137,7 +2137,7 @@ let elab_expr ctx loc env a =
let b1,env = elab env a1 in
let b2,env = elab env a2 in
if List.mem AConst (attributes_of_type env b1.etyp) then
- fatal_error "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
error "expression is not assignable";
if not (wrap2 valid_assignment loc env b2 b1.etyp) then begin
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index 357c6c50..b2a668f0 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -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 *)
diff --git a/cparser/handcrafted.messages b/cparser/handcrafted.messages
index 16dbb2a0..95077739 100644
--- a/cparser/handcrafted.messages
+++ b/cparser/handcrafted.messages
@@ -2664,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.