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
2
votes
0 answers

AdaCore's GNAT Community Edition on Apple BigSur on Intel Chips

Has anyone had success with AdaCore's GNAT Community Edition 2021 on Apple BigSur on Intel Chips? I am running into problems migrating from my 2012 MacBook Pro Catalina and 2018 Gnat to a 2017 MBP with BigSur, but still on Intel. I get the newer…
2
votes
1 answer

Why my loop invariant might not be preserved by any iteration?

I'm trying to write a code in Spark that computes the value of the polynomial using the Horner method. The variable Result is calculated by Horner, and the variable Z is calculated in the classical way. I've done a lot of different tests and my loop…
s7e0n5g1a
  • 47
  • 1
  • 7
2
votes
1 answer

Cannot make gnat-llvm : Ada.Strings.Text_Output" is not a predefined library unit

I do a make for gnat-llvm on ubuntu. (https://github.com/AdaCore/gnat-llvm) I have ggc-9 installed, I tried also with gcc-10. failure just at the beginning of the build: make -C llvm-interface build gnatlib-automated make[1] : on entre dans le…
2
votes
2 answers

Ada compilation Missing Subunits

I recently updated to a new version of the GNAT compiler.. I am trying to compile the GNADE source (http://gnade.sourceforge.net/) Is there some sort of flag that I need to set or some way to debug this? I am seeing this error (When it used to…
mainstringargs
  • 13,563
  • 35
  • 109
  • 174
2
votes
3 answers

Is Ada.Containers.Functional_Maps usable in Ada2012?

The information about Ada.Containers.Functional_Maps in the GNAT documentation is quite—let's say—abstruse. First, it says this: …these containers can still be used safely. In the second paragraph, it seems to me that you cannot free the memory…
Albatros23
  • 297
  • 2
  • 14
2
votes
2 answers

GNAT studio 2020 community does not react anymore with GDB Windows 10

I have several ADA projects developing with GNAT studio community version 2020. In some of these projects when I trying to debug, clicking debug results in "Program does not react anymore" when Initializing the debug session. I run the latest…
ldries46
  • 61
  • 1
2
votes
2 answers

GNAT Recompiling Libray files / how to force recompile all

I have an error where I get that file X (in the standard library) needs recompiling as another file has changed. It had changed, as I accidentally changed it but corrected the change (confirmed with md5sum check). However the timestamp has changed,…
David Boshton
  • 2,555
  • 5
  • 30
  • 51
2
votes
2 answers

Using Gnu Make to compile ada project requiring gnatprep and gnatchop

I have been trying to convert multiple large ada compilations from a script based approach to using a gnu make 3.82 makefile and could use some veteran knowledge. Some background: GNAT 4.8.5 on Red Hat Enterprise Linux version 7.9 Each compilation…
snwkidz
  • 23
  • 4
2
votes
2 answers

Ada static compilation

I have compiled a simple Ada application which uses the Win32Ada library. I'm compiling the application on Windows using: gnatmake C:\GNAT\2020\bin\src\main.adb -I"C:\GNAT\2020\lib\win32ada" -largs -lwin32ada. The application works as expected on…
user1220022
  • 11,167
  • 19
  • 41
  • 57
2
votes
3 answers

Ada - GNAT GPS IDE not binding and linking

I'm trying to learn Ada from Wikibooks. I've downloaded and installed GNAT GPL 2011, created a project in the GPS IDE which comes with it and written an example hello world programme. The problem I have is that the GPS IDE doesn't bind and link my…
lampak
  • 890
  • 1
  • 9
  • 21
2
votes
3 answers

How to write gnatcheck rules

Is it possible to write your own gnatcheck rules, and if so, can someone point me to a good reference? I am searching for a particular "style" that is being used, and would love if I could simply write a rule that says if you see said style, it will…
onaclov2000
  • 5,741
  • 9
  • 40
  • 54
2
votes
1 answer

pragma export function is not external in Ada executable

I need a Visual Studio C++ DLL be able to call a function in my Ada mainline. The Ada code has a function spec like package offset is function GET_OFFSET return integer; pragma Export (Stdcall, GET_OFFSET, "fnAdaOffset"); end offset; The…
erict
  • 1,394
  • 2
  • 14
  • 28
2
votes
2 answers

Is there a way to create and reuse aspect sets in Ada (specifically GNAT)?

In C/C++ I often use the preprocessor to define procedures that are based on common base procedure (yes, I know, functions in C). For example (the names, types, and values are hypothetical): // in some .h file void some_base_procedure(int a, char…
bogen85
  • 83
  • 6
2
votes
0 answers

Building a DLL for Windows with a specific base address

I am working on a project for a Windows library in Ada that must be compiled in a DLL, starting from a .gpr project via GPRBuild. I was able to produce a working DLL for Windows, but now I want to specify the base address for the location of the…
2
votes
1 answer

Issue with linker for Mac OS

I have recently started using ada for a lab in my systems programming class and I can say it is really interesting. I tried most of it at the computers labs for testing and I decided to install the compiler and its linking tools in a…
user14192734