Questions tagged [gnat]

the GNU Ada compiler that comes as part of GCC (the GNU Compiler Collection including the GNU C Compiler). This tag includes all the various versions of GNAT: • GNAT Community Edition as released by AdaCore under GPL, • FSF as available with gcc distributions under GPL with Runtime Library Exception, and • GNAT Pro under proprietary license from AdaCore.

When under development through a USA Department of Defense contract, GNAT was originally an acronym for The GNU NYU Ada 9X Translator. GNAT is a Ada-language front end in the GNU Compiler Collection (GCC) that adorns the GCC C/C++ GIMPL semantic tree with Ada semantics. This GIMPLE semantic tree is then fed into the Register Transfer Language (RTL) backend of GCC to produce assembly language and/or machine code. Modern GNAT also has an LLVM backend as well.

424 questions
3
votes
2 answers

Unexpected CONSTRAINT_ERROR after GCC update

We recently updated GCC versions (4.8.2 to 5.3.0) and started receiving unexpected constraint errors in some Ada applications. I've reduced it to the following: -- moo.adb with text_io; procedure moo is type thing_type is…
Kevin
  • 510
  • 4
  • 16
3
votes
3 answers

Ada Syntax for initializing dynamically allocated array

What is the correct syntax for initializing a dynamically allocated array in Ada? I have tried this: type Short_Array is array (Natural range <>) of Short; Items : access Short_Array; Items := new Short_Array(1..UpperBound)'(others => 0); which…
Scott L.
  • 265
  • 2
  • 9
3
votes
2 answers

How to Create an UDP client in Ada

I'm working on UDP communications using Ada. This code has to send some data to another host which is going to process it. I'm trying to send an initial message to start the communication, but it doesn't work. My client code is the following: with…
eps_712
  • 135
  • 1
  • 2
  • 8
3
votes
1 answer

How to add -Wuninitialized in a gnatcheck report?

I want to have the uninitialized variables in my gnatcheck report but the format of this warning is incompatible with the format: +RWarnings:xxxx (with xxxx the differents warnings switches) I have try to write this programming rules like the…
user1111
  • 33
  • 4
3
votes
5 answers

How to make executables made with GNAT smaller?

So I've been playing with Ada for some time, it's an awesome language, but I can't figure out how to make executables smaller (I'm using GNAT 5.3 on windows). Currently, file size of hello world is about 800 kb. When i strip debugging info it…
3
votes
1 answer

Assessment of Memory usage in GNAT 2012 for Bare Boards

I have installed the GNAT 2012 for Bare Boards and adapted the sfp runtime (ravenscar profile) released for STM32F4XX (Discovery board) to use it for a STM32F2XX Microcontroller. The modified SFP runtime works and it's been integrated with an…
Elisabeth
  • 111
  • 6
3
votes
3 answers

Ada 95 compiler version change, having casting issues

I am working on a legacy Ada 95 project (inherited from some other company) which was originally compiled using GNAT 3.13a1. I have updated the compiler to GNAT 4.7.4, to get access to some GNAT libraries that I would like to use in further…
Ogre
  • 781
  • 3
  • 10
  • 30
3
votes
1 answer

How can I use an Ada module in a Perl program using XS?

I started learning Ada recently and knowing that Ada and C object files can be linked together to build a multilingual program or library, is it possible to call Ada code from Perl using XS?
Cahu
  • 249
  • 2
  • 9
3
votes
2 answers

Ada beginner Stack program

Basically, I have 2 files ( .adb and .ads). I am totally new to Ada and also how to compile 2 files. The program is of a basic stack implementation. I got this compile error when I compiled the .adb file. $ gcc -c…
thestralFeather7
  • 529
  • 2
  • 10
  • 28
3
votes
3 answers

Ada - How to generate a list of package variables from GNAT Pro Studio?

I'd like to use the xref information from a GPS Ada project to generate lists of the variables defined for each package spec and body. I need to exclude any variables defined inside of subprograms. I can see this information in GPS's "Project…
bubbadoughball
  • 193
  • 2
  • 11
3
votes
1 answer

Sharing data across shared libraries/objects in Ada95

Okay, this'll be a long one, I apologise for that in advance. =) I need to point out that the code used here unfortunately does not exactly match the actual production code, for confidentiality reasons, but is constructed to illustrate the problem,…
n42
  • 73
  • 7
3
votes
1 answer

What's the name of the executable to run GNAT GPS in linux?

IT just installed this on my machine. I'm trying to find the name of the executable to run GNAT GPS. Thanks.
Daniel Ogburn
  • 551
  • 1
  • 6
  • 16
3
votes
1 answer

Ada compiler crashes with "Ada compiler not installed on this system." after downgrading gcc version

I downgraded my gcc version 4.6.3 to 4.3.4 but ada version is not changed gnat-4.6.3 so I got error Ada compiler not installed on this system. How to set my ada to gnat 4.3.4?
Ragu
  • 97
  • 4
3
votes
1 answer

Gnat create process without console

I need an application that will run silently in the background, yet still interact with the current user's desktop, and is not a service. I want the application to start without spawning a stdout console. In C, it seems to be done using FreeConsole…
Ignoreme
  • 193
  • 1
  • 2
  • 11
3
votes
2 answers

GNAT.Sockets obtain MAC Address

Is there a way to obtain a MAC address with GNAT.Sockets? I've read the .ads file several times and seen nothing that looks like it would yield a MAC address. Ads here
Ignoreme
  • 193
  • 1
  • 2
  • 11