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: Is Ada 2005 Issue AI-0157 implemented correctly in GCC 4.6.0?


Thanks for the explanation, Robert.

To be clear, it's code maintained by Adacore that has run afoul of the change. I don't believe gprbuild is part of Adacore's public repository, so I'm not quite sure how I'm supposed to obtain a version of gprbuild that will compile with GCC 4.6.0. This version was released with GNAT GPL 2010 recently, rather than separately, so I'm afraid that I'll need to wait until around July 2011 before the next release! :( Maybe a patch for gprbuild_gpl_2010 can be made available?

Regards,
John


On 28/10/2010 15:47, Robert Dewar wrote:
On 10/28/2010 9:37 AM, John Marino wrote:
   This Ada 2012 amendment titled "Calling Unchecked Deallocation is
illegal for zero-sized pools" has been implemented in GCC 4.6.0 recently
(ada/sem_intr.adb).  However, the restriction is enforced even when
-gnat2005 (or -gnat95) switched are explicitly passed to gcc.

Shouldn't this check only be enforced with the -gnat2012 switch?

I discovered this trying to build Adacore's gprbuild_gpl_2010 package.
The build fails with GCC 4.6.0 with the message "sinput.adb:808:19:
deallocation from empty storage pool"

The -gnat05 switch is explicitly used in the gpr settings, so I would
expect AI-0157 to not be in effect.
Am I wrong?

This is a binding interpretation, which means that it is something that should have been there all along and is reasonable to include in earlier versions, so this change is indeed deliberate and fine. If your code runs afoul of the change, you were doing erroneous things anyway.


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