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
0
votes
1 answer

Compiling ada library gnatcoll-json.adb with gnat on OS/X

I've got the source from Adacore, so it should work - I've left an 'issue' on Adacore as well, but it might take some time to get a resolution there. I suspect that I might be doing something wrong, any suggestions? Here's the problem: $ gnat make…
Peter Brooks
  • 349
  • 3
  • 13
0
votes
1 answer

Error when compiling in AdaGIDE using win32

I'm experiencing some troubles with AdaGIDE compiler and its libraries. I installed GNAT 2013 and AdaGIDE 7.45 on Windows XP. When I'm trying to compile any code that requires win32 (eg. with win32.winnt;) AdaGIDE's console says file "win32.ads" not…
0
votes
1 answer

Ada index check failed

when attempting to run this program i get the error: raised CONSTRAINT_ERROR : bifid.adb:55 index check failed I'm not really sure where this error is coming from or what it exactly means. The line in question is End_String := End_String &…
user2396120
  • 51
  • 1
  • 3
0
votes
3 answers

Forcing Ada to use minimum spec size for enumerated types with gnat 4.4

I have an enumerated type that needs to be 4 bits but when I declare a variable of that type the compiler assigns that variable 8 bits. Below is a simplified version of the code. subtype ab_range_index is word range 0..3; type ab_buffer_type is…
0
votes
2 answers

cannot generate code for file

Please have a look at the following code Formula.ads package Formula is procedure CalculateFormula; end Formula; Formula.adb with Ada.Text_IO; use Ada.Text_IO; with Formula; use Formula; package body Formula is procedure CalculateFormula…
PeakGen
  • 21,894
  • 86
  • 261
  • 463
0
votes
3 answers

GNAT Programming Suite - source file not found

Ada is still new to me, so I am trying to find my way around the GPS IDE. I asked another question earlier, but I think this problem has precedence over that one, and may be at the root of my trouble. When I compile, I am getting a long list of…
Jim
  • 5,940
  • 9
  • 44
  • 91
0
votes
2 answers

GNAT Programming Suite: Cross-Reference Info Not Up To Date (this is a guess)

I'm trying to get package references resolved during a build, using GNAT Programming Suite (hosted on Win XP). In the Builder Results, I get errors like this one: file "ac_configuration_s.ada" not found Clicking on the error takes me to a line like…
Jim
  • 5,940
  • 9
  • 44
  • 91
-1
votes
1 answer

How to get gnatmake to create a mapfile for an Ada .dll?

So, I am trying to get gnatmake to give me a map file for a dll I am building. But it i resisting every effort to do so. --create-map-file is only for executable, and it does make one for that, but I cannot get it to take for a .dll. I have tried -M…
lostfox
  • 9
  • 2
-1
votes
1 answer

Configure PolyORB fails on Linux with GNAT 2019 public version for Linux 64 bit

The configure script checks that the compiler can build c programs and fails saying the compiler for c cannot build executables. (checking whether the C compiler works... no) doing the command gcc x.c gives "gcc: error trying to exec 'cc1': execvp:…
Wayne B.
  • 7
  • 1
  • 1
-1
votes
1 answer

How to send then receive packet from Client-Server in Ada

I want to create a server-client connection where a client send a request packet to the server then return a value back to the user. I can get the server to read the incoming packet from the client, but when it write back to the client, the client…
user1713114
  • 19
  • 1
  • 1
  • 6
-1
votes
3 answers

How to call Ada dll function in Ada program?

I created an Ada DLL that contains a function that returns the sum of the two integers given to it. I am trying to implement an Ada program that loads the Ada DLL, calls the function with two numbers, and then prints the result on the console. with…
a verma
  • 25
  • 6
-1
votes
1 answer

A program compiles OK on GNAT for Windows, but on Ubuntu GNAT gives error that Yield is not in Ada.Dispatching

Why is there a difference between GNAT on Windows 7 and GNAT on Ubuntu? I have searched the web and cannot find any answers.
BillZ
  • 1
-1
votes
2 answers

Link list in Ada

I am new to Ada, I am doing linked list program and facing some strange issue When i am adding node in list i can traverse to last node and print node value, but when i am traversing to actually print values program exits, below is my code, with…
SD.
  • 1,432
  • 22
  • 38
-2
votes
1 answer

Could not find gnatmake binary after MacOS installation

After installing gnat for darwin (arm) macos, following this guide (see "AdaCore compiler on mac" section), I could not find the gnatmake in the /bin folder that all the other binaries were in. Quite confused. (I wanted to install gnat to build…
dcxst
  • 173
  • 3
  • 8
-2
votes
2 answers

How to incorporate proof aspects into the specification so that every function and procedure has a Post aspect and, if required, a Pre aspect

How to incorporate proof aspects into the specification so that every function and procedure has a Post aspect and, if required, a Pre aspect that outlines the proper behaviour of the code below: package Stack with SPARK_Mode is pragma…
user20261045
1 2 3
28
29