From: Ludovic Brenta on 10 May 2010 17:00 Yannick Duchêne writes on comp.lang.ada: > Le Mon, 10 May 2010 10:02:45 +0200, Dmitry A. Kazakov > <mailbox(a)dmitry-kazakov.de> a écrit: >> Maybe FSF will gain in 1-2 years, but then Ada 2012 will appear, breaking >> it again. > Yes, it happens I'm thinking about that trouble, as I'm waiting for > long for the Programing By Contract (tm) capabilities (I use to be an > Eiffel advocator for some times in the past). As I'm pretty sure they > will not be support for that in the GCC or MinGW version, I was > thinking I will probably go for a fall-back : just modify the actual > version so that it will at least accept the syntax, so as to be able > to write these pre- and post-conditions for documentation > purpose. There will be not check at runtime (should be nice to ensure > validity of expressions contained in the pre- and post- by the way), > but this will at least allow to write it (a fall-back, as I said). > > 2012 in very close... So close, in fact, that the pre-, postconditions and invariants are already supported in GCC 4.4 (and therefore Debian) as implementation-defined pragmas: http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Precondition.html http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Postcondition.html http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Assert.html -- Ludovic Brenta.
From: Yannick Duchêne (Hibou57) on 10 May 2010 18:17 Le Mon, 10 May 2010 23:00:32 +0200, Ludovic Brenta <ludovic(a)ludovic-brenta.org> a écrit: > So close, in fact, that the pre-, postconditions and invariants are > already supported in GCC 4.4 (and therefore Debian) as > implementation-defined pragmas: > > http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Precondition.html > http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Postcondition.html > http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Assert.html Lot of thanks for the news. So I have to guess MinGW (what I actually use) is a bit more outdated than GCC is. However, I will check if ever I missed a recent update. Nice point indeed -- No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just not lucky
From: Ludovic Brenta on 11 May 2010 02:56 Yannick Duchêne wrote on comp.lang.ada: > Le Mon, 10 May 2010 23:00:32 +0200, Ludovic Brenta > <ludo...(a)ludovic-brenta.org> a écrit:> So close, in fact, that the pre-, postconditions and invariants are > > already supported in GCC 4.4 (and therefore Debian) as > > implementation-defined pragmas: > > >http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Precondition.html > >http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Postcondition.... > >http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gnat_rm/Pragma-Assert.html > > Lot of thanks for the news. So I have to guess MinGW (what I actually use) > is a bit more outdated than GCC is. However, I will check if ever I missed > a recent update. > > Nice point indeed BTW, GCC 4.4.0 was released on 2009-04-21 (and reached Debian unstable on 2009-07-26), so you've been waiting for 13 months for a feature that was already there... -- Ludovic Brenta.
From: Dmitry A. Kazakov on 11 May 2010 03:39 On Mon, 10 May 2010 20:45:18 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Mon, 10 May 2010 10:02:45 +0200, Dmitry A. Kazakov > <mailbox(a)dmitry-kazakov.de> a �crit: >> Maybe FSF will gain in 1-2 years, but then Ada 2012 will appear, breaking >> it again. > Yes, it happens I'm thinking about that trouble, as I'm waiting for long > for the Programing By Contract (tm) capabilities (I use to be an Eiffel > advocator for some times in the past). I am not. Eiffel does it wrong. SPARK does it right. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
From: Ludovic Brenta on 11 May 2010 03:51
Simon J. Wright wrote on comp.lang.ada: > On May 10, 10:46 am, Ludovic Brenta <ludo...(a)ludovic-brenta.org> > wrote: > >> Actually, the fixes *are* exposed to public purview. This happens when >> AdaCore merge their fixes into GCC. Each patch appears as a >> self-contained email on the gcc-patches mailing list, complete with a >> technical description of the bug and even the AdaCore bug number; only, >> we don't know what triggered the bug, so it is difficult to relate the >> technical description to a publicly known bug trigger. > > I haven't seen any of these (I guess I joined that list between > merges) but presumably the test suite does get updated (as with > changes for other languages). Here is a good, small example: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01528.html The patch includes a detailed description of the bug, i.e. the result of analyzing a bug report. The bug report itself (and any triggering code) is absent, as is the AdaCore bug number. The patch does contain a new test which triggers the bug; AdaCore constructed this from the analysis of the bug report. As you can see from the message, AdaCore applied this particular patch to both the mainline (i.e. the future GCC 4.6.0) and to the GCC 4.5 branch (i.e. the future GCC 4.5.1). GCC 4.6 entered Stage 1 on 2010-04-06 (immediately after the release of GCC 4.5.0) and the Ada patches started pouring in. The same happened for the Stage 1 of GCC 4.5.0 in March and April 2009; you can browse the mailing list archives and look for the tag "[Ada]" in the subject lines. PS. Thanks, Simon, for this: 2010-01-09 Simon Wright <simon(a)pushface.org> PR ada/42626 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing end-quote. -- Ludovic Brenta. |