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.