diff options
Diffstat (limited to 'cparser')
-rw-r--r-- | cparser/Cerrors.ml | 11 | ||||
-rw-r--r-- | cparser/Cerrors.mli | 4 | ||||
-rw-r--r-- | cparser/Elab.ml | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml index 9ca04a62..3263ecea 100644 --- a/cparser/Cerrors.ml +++ b/cparser/Cerrors.ml @@ -61,7 +61,7 @@ type warning_type = | Implicit_function_declaration | Pointer_type_mismatch | Compare_distinct_pointer_types - | Pedantic + | Implicit_int | Main_return_type | Invalid_noreturn | Return_type @@ -81,6 +81,7 @@ let active_warnings: warning_type list ref = ref [ Implicit_function_declaration; Pointer_type_mismatch; Compare_distinct_pointer_types; + Implicit_int; Main_return_type; Invalid_noreturn; Return_type; @@ -102,7 +103,7 @@ let string_of_warning = function | Implicit_function_declaration -> "implicit-function-declaration" | Pointer_type_mismatch -> "pointer-type-mismatch" | Compare_distinct_pointer_types -> "compare-distinct-pointer-types" - | Pedantic -> "pedantic" + | Implicit_int -> "implicit-int" | Main_return_type -> "main-return-type" | Invalid_noreturn -> "invalid-noreturn" | Return_type -> "return-type" @@ -140,7 +141,7 @@ let wall () = Implicit_function_declaration; Pointer_type_mismatch; Compare_distinct_pointer_types; - Pedantic; + Implicit_int; Main_return_type; Invalid_noreturn; Return_type; @@ -162,7 +163,7 @@ let werror () = Implicit_function_declaration; Pointer_type_mismatch; Compare_distinct_pointer_types; - Pedantic; + Implicit_int; Main_return_type; Invalid_noreturn; Return_type; @@ -282,7 +283,7 @@ let warning_options = error_option Implicit_function_declaration @ error_option Pointer_type_mismatch @ error_option Compare_distinct_pointer_types @ - error_option Pedantic @ + error_option Implicit_int @ error_option Main_return_type @ error_option Invalid_noreturn @ error_option Return_type @ diff --git a/cparser/Cerrors.mli b/cparser/Cerrors.mli index 1ef8bb21..56894c87 100644 --- a/cparser/Cerrors.mli +++ b/cparser/Cerrors.mli @@ -28,7 +28,7 @@ type warning_type = | Unnamed (** warnings which cannot be turned off *) | Unknown_attribute (** usage of unsupported/unknown attributes *) | Zero_length_array (** gnu extension for zero lenght arrays *) - | Celeven_extension (** C11 fetatures *) + | Celeven_extension (** C11 features *) | Gnu_empty_struct (** gnu extension for empty struct *) | Missing_declarations (** declation which do not declare anything *) | Constant_conversion (** dangerous constant conversions *) @@ -37,7 +37,7 @@ type warning_type = | Implicit_function_declaration (** deprecated implicit function declaration *) | Pointer_type_mismatch (** pointer type mismatch in ?: operator *) | Compare_distinct_pointer_types (** comparison between different pointer types *) - | Pedantic (** non C99 code *) + | Implicit_int (** implict int parameter or return type *) | Main_return_type (** wrong return type for main *) | Invalid_noreturn (** noreturn function containing return *) | Return_type (** void return in non-void function *) diff --git a/cparser/Elab.ml b/cparser/Elab.ml index b6418217..8d14baf1 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2115,7 +2115,7 @@ let elab_KR_function_parameters env params defs loc = | [] -> (* Parameter is not declared, defaults to "int" in ISO C90, is an error in ISO C99. Just emit a warning. *) - warning loc Pedantic "type of '%s' defaults to 'int'" param; + warning loc Implicit_int "type of '%s' defaults to 'int'" param; TInt (IInt, []) | (_, ty) :: rem -> if rem <> [] then |