This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch for -Wno-long-long and early GNAT compilers


<If by "libraries" you mean run-time (target) libraries, feel free to use
non-standard features, since that is not a boot-strapping problem.  The
issue is the compile-time (host) code that is written in Ada.  That code
really should be written to minimize dependencies on a specific compiler
version, whether it is written in C, C++, Java, or Ada.
>>

Well the C part is written in GNU C (notably it uses some GNU C extensions,
in particular the use of built in longjmp/setjmp is critical for efficiency).
It *should* compile using any version of the GNU C compiler, but it is 
impossible to extend that universal quantifier to arbitrarily broken versions
of the compiler. 

Note that the code that caused trouble here was C code, not Ada code, and
the trouble was caused not by non-standard Ada code, but by a bug in the
C compiler that was being used (which is not the compiler we had tested).

Regarding dependency on a specific version, we occasionally find that we
need new GNAT attributes or pragmas to cleanly and successfully deal with
problems in the Ada code.

A good example is the problem of warnings with unreferenced parameters. Our
standard is to require warning free code (we compile with -gnatwe). Right now
we use pragma Warnings (On|Off) to deal with this, but it's a bit kludgy, and
eventually some cycle in the future, we will use the new pragma
Unreferenced to get a much cleaner solution. Obviously you can't use this
as soon as you oimplement it :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]