aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 12:36:12 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 12:36:12 +0100
commitc6493b9f2021550b2643988ab0d715efd3b064d9 (patch)
tree5d35a73e6c0625a17db3e15bb95ef88b933ae76e
parent7af1cf8342f73410aba4a9edf0c54b918a6a775d (diff)
downloadgcc-c6493b9f2021550b2643988ab0d715efd3b064d9.zip
gcc-c6493b9f2021550b2643988ab0d715efd3b064d9.tar.gz
gcc-c6493b9f2021550b2643988ab0d715efd3b064d9.tar.bz2
[multiple changes]
2012-10-29 Robert Dewar <dewar@adacore.com> * s-bignum.adb: Minor comment change. 2012-10-29 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c: Fix signedness of ioctl request identifiers for x86_64-freebsd. 2012-10-29 Yannick Moy <moy@adacore.com> * exp_alfa.adb (Expand_Alfa): Remove qualification of names. From-SVN: r192937
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/exp_alfa.adb14
-rw-r--r--gcc/ada/s-bignum.adb2
-rw-r--r--gcc/ada/s-oscons-tmplt.c15
4 files changed, 38 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 96f81e7..cf5fbb5 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,18 @@
2012-10-29 Robert Dewar <dewar@adacore.com>
+ * s-bignum.adb: Minor comment change.
+
+2012-10-29 Thomas Quinot <quinot@adacore.com>
+
+ * s-oscons-tmplt.c: Fix signedness of ioctl request identifiers
+ for x86_64-freebsd.
+
+2012-10-29 Yannick Moy <moy@adacore.com>
+
+ * exp_alfa.adb (Expand_Alfa): Remove qualification of names.
+
+2012-10-29 Robert Dewar <dewar@adacore.com>
+
* sem_prag.adb: Minor reformatting.
2012-10-29 Robert Dewar <dewar@adacore.com>
diff --git a/gcc/ada/exp_alfa.adb b/gcc/ada/exp_alfa.adb
index 2a640fd..5c44849 100644
--- a/gcc/ada/exp_alfa.adb
+++ b/gcc/ada/exp_alfa.adb
@@ -28,7 +28,6 @@ with Einfo; use Einfo;
with Exp_Attr; use Exp_Attr;
with Exp_Ch4; use Exp_Ch4;
with Exp_Ch6; use Exp_Ch6;
-with Exp_Dbug; use Exp_Dbug;
with Exp_Util; use Exp_Util;
with Nlists; use Nlists;
with Rtsfind; use Rtsfind;
@@ -81,11 +80,17 @@ package body Exp_Alfa is
when N_Attribute_Reference =>
Expand_Alfa_N_Attribute_Reference (N);
+ -- Note: we use to qualify entity names in the following constructs
+ -- (as full expansion does), but this was removed as this prevents
+ -- the verification back-end from using a short name for debugging
+ -- and user interaction. The verification back-end already takes
+ -- care of qualifying names when needed
+
when N_Block_Statement |
N_Package_Body |
N_Package_Declaration |
N_Subprogram_Body =>
- Qualify_Entity_Names (N);
+ null;
when N_Subprogram_Call =>
Expand_Alfa_Call (N);
@@ -97,6 +102,9 @@ package body Exp_Alfa is
when N_In =>
Expand_Alfa_N_In (N);
+ -- A NOT IN B gets transformed to NOT (A IN B). This is the same
+ -- expansion used in the normal case, so shared the code.
+
when N_Not_In =>
Expand_N_Not_In (N);
@@ -106,6 +114,8 @@ package body Exp_Alfa is
when N_Simple_Return_Statement =>
Expand_Alfa_N_Simple_Return_Statement (N);
+ -- In Alfa mode, no other constructs require expansion
+
when others =>
null;
end case;
diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb
index 70486f2..cb7a4f6 100644
--- a/gcc/ada/s-bignum.adb
+++ b/gcc/ada/s-bignum.adb
@@ -234,7 +234,7 @@ package body System.Bignums is
-- Expose a writable view of discriminant BD.Len so that we can
-- initialize it. We need to use the exact layout of the record
- -- for the overlay to shield ourselves from endianness issues.
+ -- to ensure that the Length field has 24 bits as expected.
type Bignum_Data_Header is record
Len : Length;
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 50a55e4..25299e8 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -218,6 +218,14 @@ int counter = 0;
#define CST(name,comment) C(#name,String,name,comment)
+/* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */
+
+#ifdef __FreeBSD__
+# define CNI CNU
+#else
+# define CNI CND
+#endif
+
#define STR(x) STR1(x)
#define STR1(x) #x
@@ -373,12 +381,12 @@ CND(FNDELAY, "Nonblocking")
#ifndef FIONBIO
# define FIONBIO -1
#endif
-CND(FIONBIO, "Set/clear non-blocking io")
+CNI(FIONBIO, "Set/clear non-blocking io")
#ifndef FIONREAD
# define FIONREAD -1
#endif
-CND(FIONREAD, "How many bytes to read")
+CNI(FIONREAD, "How many bytes to read")
/*
@@ -1318,6 +1326,7 @@ CND(SIZEOF_struct_servent, "struct servent");
#define SIZEOF_sigset (sizeof (sigset_t))
CND(SIZEOF_sigset, "sigset");
#endif
+
/*
-- Fields of struct msghdr
@@ -1399,7 +1408,7 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock")
/* There's no clock_gettime or clock_id's on Darwin, generate a dummy value */
# define CLOCK_RT_Ada "-1"
-#elif defined(FreeBSD) || defined(_AIX)
+#elif defined(__FreeBSD__) || defined(_AIX)
/** On these platforms use system provided monotonic clock instead of
** the default CLOCK_REALTIME. We then need to set up cond var attributes
** appropriately (see thread.c).