aboutsummaryrefslogtreecommitdiffstats
path: root/cparser
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-09-21 16:07:22 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-09-21 16:07:22 +0200
commite346f0da710591690fc6b94f921fb5a39a11c7bf (patch)
treea072cc44b689263d116cb26affb2039a7901f593 /cparser
parente77d3e706e056bb2cd58ae0a7cf6f97fb893ccae (diff)
downloadcompcert-e346f0da710591690fc6b94f921fb5a39a11c7bf.tar.gz
compcert-e346f0da710591690fc6b94f921fb5a39a11c7bf.zip
Make unnamed default + correct empty struct warning. Bug 18004
Diffstat (limited to 'cparser')
-rw-r--r--cparser/Cerrors.ml1
-rw-r--r--cparser/Elab.ml4
2 files changed, 3 insertions, 2 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml
index f95188e8..dc0258a5 100644
--- a/cparser/Cerrors.ml
+++ b/cparser/Cerrors.ml
@@ -70,6 +70,7 @@ type warning_type =
| CompCert_conformance
let active_warnings: warning_type list ref = ref [
+ Unnamed;
Unknown_attribute;
Celeven_extension;
Gnu_empty_struct;
diff --git a/cparser/Elab.ml b/cparser/Elab.ml
index f82ae176..b6418217 100644
--- a/cparser/Elab.ml
+++ b/cparser/Elab.ml
@@ -843,9 +843,9 @@ and elab_struct_or_union_info keep_ty kind loc env members attrs =
(* Warn for empty structs or unions *)
if m = [] then
if kind = Struct then begin
- warning loc Celeven_extension "anonymous structs are a C11 extension"
+ warning loc Gnu_empty_struct "empty struct is a GNU extension"
end else begin
- fatal_error loc "anonymous unions are a C11 extension"
+ fatal_error loc "empty union is a GNU extension"
end;
(composite_info_def env' kind attrs m, env')