This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: patch for -Wno-long-long and early GNAT compilers
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, per at bothner dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 19 Mar 2002 00:03:32 -0500 (EST)
- Subject: 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 :-)