public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3799] [Ada] VxWorks inconsistent use of return type (vx_freq_t)
@ 2021-09-22 15:10 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-22 15:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2df3e43eb97a3d1e96485a9b682f9a07478b6da7
commit r12-3799-g2df3e43eb97a3d1e96485a9b682f9a07478b6da7
Author: Doug Rupp <rupp@adacore.com>
Date: Mon Jul 12 10:52:32 2021 -0700
[Ada] VxWorks inconsistent use of return type (vx_freq_t)
gcc/ada/
* libgnarl/s-osinte__vxworks.ads (SVE): New package renaming
(vx_freq_t): New subtype.
(sysClkRateGet): Return vx_freq_t.
* libgnarl/s-vxwext.ads (vx_freq_t): New type.
* libgnarl/s-vxwext__kernel.ads: Likewise.
* libgnarl/s-vxwext__rtp.ads: Likewise.
Diff:
---
gcc/ada/libgnarl/s-osinte__vxworks.ads | 4 +++-
gcc/ada/libgnarl/s-vxwext.ads | 3 +++
gcc/ada/libgnarl/s-vxwext__kernel.ads | 3 +++
gcc/ada/libgnarl/s-vxwext__rtp.ads | 3 +++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/libgnarl/s-osinte__vxworks.ads b/gcc/ada/libgnarl/s-osinte__vxworks.ads
index a2d5620a03c..384cdec1fae 100644
--- a/gcc/ada/libgnarl/s-osinte__vxworks.ads
+++ b/gcc/ada/libgnarl/s-osinte__vxworks.ads
@@ -57,6 +57,8 @@ package System.OS_Interface is
type unsigned_long_long is mod 2 ** long_long'Size;
type size_t is mod 2 ** Standard'Address_Size;
+ subtype vx_freq_t is System.VxWorks.Ext.vx_freq_t;
+
-----------
-- Errno --
-----------
@@ -312,7 +314,7 @@ package System.OS_Interface is
function taskDelay (ticks : int) return int;
pragma Import (C, taskDelay, "taskDelay");
- function sysClkRateGet return int;
+ function sysClkRateGet return vx_freq_t;
pragma Import (C, sysClkRateGet, "sysClkRateGet");
-- VxWorks 5.x specific functions
diff --git a/gcc/ada/libgnarl/s-vxwext.ads b/gcc/ada/libgnarl/s-vxwext.ads
index 915db33af18..1c9847f10f6 100644
--- a/gcc/ada/libgnarl/s-vxwext.ads
+++ b/gcc/ada/libgnarl/s-vxwext.ads
@@ -46,6 +46,9 @@ package System.VxWorks.Ext is
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type vx_freq_t is new unsigned;
+ -- Equivalent of the C type _Vx_freq_t
+
type Interrupt_Handler is access procedure (parameter : System.Address);
pragma Convention (C, Interrupt_Handler);
diff --git a/gcc/ada/libgnarl/s-vxwext__kernel.ads b/gcc/ada/libgnarl/s-vxwext__kernel.ads
index 3c200a10033..6cecf182180 100644
--- a/gcc/ada/libgnarl/s-vxwext__kernel.ads
+++ b/gcc/ada/libgnarl/s-vxwext__kernel.ads
@@ -45,6 +45,9 @@ package System.VxWorks.Ext is
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type vx_freq_t is new unsigned;
+ -- Equivalent of the C type _Vx_freq_t
+
type Interrupt_Handler is access procedure (parameter : System.Address);
pragma Convention (C, Interrupt_Handler);
diff --git a/gcc/ada/libgnarl/s-vxwext__rtp.ads b/gcc/ada/libgnarl/s-vxwext__rtp.ads
index d13344eb7af..d955c9c30a5 100644
--- a/gcc/ada/libgnarl/s-vxwext__rtp.ads
+++ b/gcc/ada/libgnarl/s-vxwext__rtp.ads
@@ -45,6 +45,9 @@ package System.VxWorks.Ext is
subtype int is Interfaces.C.int;
subtype unsigned is Interfaces.C.unsigned;
+ type vx_freq_t is new unsigned;
+ -- Equivalent of the C type _Vx_freq_t
+
type Interrupt_Handler is access procedure (parameter : System.Address);
pragma Convention (C, Interrupt_Handler);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-22 15:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 15:10 [gcc r12-3799] [Ada] VxWorks inconsistent use of return type (vx_freq_t) Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).