[Bug ada/59671] Improper Ada behavior under -gnat2012

p-kell at live dot com gcc-bugzilla@gcc.gnu.org
Mon Jan 6 02:01:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59671

--- Comment #4 from Patrick Kelly <p-kell at live dot com> ---
Let's say I'm trying to build a library/package, tens thousands of lines long,
provided by someone else. Is changing every instance of a function with an
"out" parameter to a procedure with an "out" parameter, and an additional "out"
for what used to be the return, really a workaround? For a convenient little
test case, sure, it's a workaround. For real code projects, in no way is the
proposed a valid workaround. Just because I happened to encounter this early on
in a project, where I could work around it, doesn't mean it wouldn't be
encountered late, possibly at release time.

Nearly identical, yes, "nearly" having quite an important role in semantics.
Code that fits the ARM2012 is not properly compiling under -gnat2012. The
"duplicate" bug was in regards to pragmas causing this. This bug is in regards
to "out" parameters on functions. I've already stated this. If you consider
them to be identical issues, then at this point I ask how? How are directives
and subroutines even closely related to each other?

I thought I was clear of the steps needed to produce it. Compile, using the
flags listed, with a function utilizing an "out" parameter. This would occur
even in test packages, in which the function was the only member of the
package.



More information about the Gcc-bugs mailing list