DragonLace.Net
Home of the GNAT AUX and future DRACO Ada compilers.

Ada 2005 Issue 157

Summary: Calling an instance of Unchecked_Deallocation has previously generated warnings on GNAT, but it wasn't illegal to do. AI05-0157 now makes this illegal, and moreover it's a "binding interpretation" meaning it's retroactively applied. It's not an Ada 2012 thing you can avoid with an explicit Ada2005 switch; it can not be turned off with the current FSF codebase.

Issue 157: Calling Unchecked_Deallocation is illegal for zero-sized pools

Practical impact: GNAT actually uses this illegal technique intentionally to build itself. When building itself, it uses a "gnat mode" which is -gnatg which somehow ignores these illegal flags, which were previously suppressed with pragma warnings off. The program "gprbuild" uses GNAT source, including a source file sinput.adb that violates this rules. No new version of Gprbuild will be issued until GNAT GPL 2011 is released likely. The bottom line is that an unmodified GNAT AUX can not build Gprbuild due to this new fatal error. Trying to build gprbuild using GNAT mode did not work, although it is not known why.

Solution: GNAT AUX will be patched. AI05-0157 will be reversed until further notice. The techique will once again result in a warning rather an fatal error, although the warning is strongly worded to avoid the technique. Once a new version of gprbuild is made available, this patch will be removed.

Obsolete!

Since this was written, gprbuild was locally patched to allow a stock gnataux to build it even with AI-157 implemented. These reversal patches are in the process of being removed from all published binaries.

Last edited Fri May 24 16:28:01 2013
© 2010 John Marino | design elements by styleshout | artwork by Arturo Aguirre