aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2022-10-21 11:09:49 -0400
committerMarc Poulhiès <poulhies@adacore.com>2022-11-08 09:35:00 +0100
commit7a08b9393c7b36c4dca8fca9a5cda261594f61d6 (patch)
tree89507df0a6c9f66706c12165c3f645d13c12f581 /gcc/ada/gcc-interface
parentc523e3f1ea9b451fddc4c535009b3eecffc4ac4a (diff)
downloadgcc-7a08b9393c7b36c4dca8fca9a5cda261594f61d6.zip
gcc-7a08b9393c7b36c4dca8fca9a5cda261594f61d6.tar.gz
gcc-7a08b9393c7b36c4dca8fca9a5cda261594f61d6.tar.bz2
ada: Move warnings switches -- initial work
This patch prepares to move warning switches from Opt into Warnsw. gcc/ada/ * warnsw.ads, warnsw.adb, fe.h, err_vars.ads, errout.ads: Move Warning_Doc_Switch from Err_Vars to Warnsw. Access Warn_On_Questionable_Layout on the C side via a function rather than a variable, because we plan to turn the variables into renamings, and you can't Export renamings. * erroutc.adb, switch-c.adb, errout.adb: Likewise. * gcc-interface/decl.cc: Use Get_Warn_On_Questionable_Layout instead of Warn_On_Questionable_Layout. * gcc-interface/Makefile.in (GNATMAKE_OBJS): Add warnsw.o, because it is indirectly imported via Errout. * gcc-interface/Make-lang.in (GNATBIND_OBJS): Likewise and remove restrict.o (not needed).
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in2
-rw-r--r--gcc/ada/gcc-interface/Makefile.in2
-rw-r--r--gcc/ada/gcc-interface/decl.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 02b2d1c..45a4168 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -601,7 +601,6 @@ GNATBIND_OBJS = \
ada/osint-b.o \
ada/osint.o \
ada/output.o \
- ada/restrict.o \
ada/rident.o \
ada/scans.o \
ada/scil_ll.o \
@@ -629,6 +628,7 @@ GNATBIND_OBJS = \
ada/uintp.o \
ada/uname.o \
ada/urealp.o \
+ ada/warnsw.o \
ada/widechar.o \
ada/gnat.o \
ada/g-dynhta.o \
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 6b19b8b..5137eba 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -333,7 +333,7 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \
snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \
switch.o switch-m.o table.o targparm.o tempdir.o types.o uintp.o \
- uname.o urealp.o usage.o widechar.o \
+ uname.o urealp.o usage.o widechar.o warnsw.o \
seinfo.o einfo-entities.o einfo-utils.o sinfo-nodes.o sinfo-utils.o \
$(EXTRA_GNATMAKE_OBJS)
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index f8c7698..e25ce49 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -8363,7 +8363,7 @@ components_to_record (Node_Id gnat_component_list, Entity_Id gnat_record_type,
&& !Debug_Flag_Dot_R);
const bool w_reorder
= (Convention (gnat_record_type) == Convention_Ada
- && Warn_On_Questionable_Layout
+ && Get_Warn_On_Questionable_Layout ()
&& !(No_Reordering (gnat_record_type) && GNAT_Mode));
tree gnu_zero_list = NULL_TREE;
tree gnu_self_list = NULL_TREE;